-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Push Server seems to consume memory continually. Memory Leak? #922
Comments
If there is no other solution, I will need to set up a cron job and restart push server every night. Since yesterday again it allocated 35% of memory. |
Short info: the cron job prevents the crash of the system caused by push server. But that’s not a very nice solution. I still hope that someone will check and perhaps optimize the memory usage of push server. |
the push server is merely some php code (using a bunch of modules). php does its memory management by itself, so as long as we are not doing nasty stuff (like keeping references to stuff not used any more), it should work just fine. System details, like php version? For the time being, as the server has no restarting the server once in a while should not do much harm as it keeps no state. You could even try to limit its memory usage, see e.g. (https://www.freedesktop.org/software/systemd/man/systemd.resource-control.html), and set up the systemd service to restart in case of failure. |
I‘m using the Raspberry Pi image from here https://wiki.volkszaehler.org/software/releases/start on a RasPi 3B+. I did not check what versions of php etc. are used in this image. As mentioned above I‘m using only one USB probe for receiving data from my power meter via vzlogger. I don’t know any internal details of the installation. The only thing I observed is the critical memory consumption of the push server php process that stops the system from working after some time. I‘m sorry, but I’m not so deeply involved in linux system tasks so I will not be able to dig into this very deep. I’m a simple user of an officially provided image and I‘m struggling with issues caused by flaws I don’t understand completely. |
How the (up-to-date) Image is configured can be looked up in Wiki: https://wiki.volkszaehler.org/howto/building_raspberry_pi_image_for_vz Everything not specifically mentioned is 1:1 like git (or OS).
One thing i'm interested: Does the memory always fill or only when Frontend is open somewhere? |
Thanks for clarification! My impression is that it always fills up, also without open frontend. |
If I understand the push server correctly it refreshes the chart in the frontend continuously while the browser is open? |
I'm also not sure whether or not a browser tab in background will continuously hold the push-server active to store data. Would be nice if you can test this by actively close the tab (or the whole browser). Edit: push-server doesn't have defined targets, it works on subscription basis. |
I tried to replicate the failure over here. Push-server consumes 7% of memory, even after 24h of runtime. Do you have some unusual notifications under |
I'm out of ideas. |
I have the Same Problem. Fresh Install an 4 USB IR Reader on an RPI 4 2GB an daily the RAM is full. |
I also have the same issue. Use a cronjob which restarts the Push-server every 6 hours
|
For me, the problem described here started with the update to Bullseye and the current version of the middleware. The memory fills up regardless of whether the frontend is open or not. |
exact same issue for me. |
anybody up to trying something like https://github.com/arnaud-lb/php-memory-profiler ? |
I installed volkszaehler last week on my RasPi 3B+ and I’m using one USB probe for my electricity meter.
Today my RasPi stopped working for the second time since then and I realized the push server php process had consumed more than 80% of the memory. There were only 19MB left in the system.
The browser frontend did not react anymore and also the ssh login was extremely slow but still possible.
After a reboot everything looked fine but some days later same effect.
Today I observed the memory consumption and found out that it started at 7%. After six hours it‘s now at 15% already. If this will go on this way, it will consume 32% per day and probably stop running again after three days.
I assume there is sort of memory leak in the push server. There was also another finding of this issue mentioned here:
https://www.photovoltaikforum.com/thread/192176-raspberry-pi-4-2gb-volkszähler-push-server-verbraucht-kompletten-ram-und-swap/
Thanks!
The text was updated successfully, but these errors were encountered: