lighttpd eats up all memory

I’ve had my RPI3 working fine for a month with those packages installed:
default lighttpd from distro
and netatalk installed manually from the source. (disabled it after a while)

Recently, I’ve updated my system using dietpi-update and now my server is unusable. After a few minutes after the boot lighttpd eats all the ram and system becomes unresponsible. I’ve managed to remove it - now the system is stable, but it is not doing what I want it to do - I mean the nextcloud service.

I’ve done a backup just before updating - restoration to it is not helping also.

Any help?
Thanks a lot!

UPD: I forgot to mention that my system is on HDD, not SD card.


Can we see a screenshot of lighttpd memory usage in (to confirm its the culprit and not a combination of other programs):


And what is the size of swapfile on system, also, have you tried increasing it?
dietpi-config > advanced options > swapfile

Here you go. It is kinda hard to catch the moment when the RAM is full, but the system is somehow responsive :rofl: After some time it is almost unusable, but I can hear it infinitely swapping like mad :thinking:
I use 1999Mb of swap - on USB HDD.

I’m starting to think that this problem is somehow related to nextcloud… But not sure yet.

Any other logs would be useful?

If I uninstall lighttpd - everything become normal.


Yep, looks like php and lighttpd might have a memory leak, or, cache size too big.

Any other logs would be useful?

cat /var/log/lighttpd/error.log
cat /var/log/php5-fpm.logp

And lets check cache sizes, should be around 50/60MB each:

cat /var/log/php5-fpm.log

[10-May-2017 16:17:22] NOTICE: configuration file /etc/php5/fpm/php-fpm.conf test is successful

[10-May-2017 16:17:22] NOTICE: fpm is running, pid 925
[10-May-2017 16:17:22] NOTICE: ready to handle connections
[10-May-2017 16:17:22] NOTICE: systemd monitor interval set to 10000ms
[10-May-2017 19:11:08] WARNING: [pool www] server reached pm.max_children setting (4), consider raising it

cat /var/log/lighttpd/error.log

2017-05-10 16:17:20: (log.c.164) server started

The cache size set to 32MB.

The OpCache has 618 scripts loaded just before the swapping begins. Do you need this huge list?

It is all I could copy for now - my system is locking itself up really fast. (I had to reboot twice in order to catch those files :rofl: )

UPD: I’ve found this

Lighttpd is not supported with Nextcloud, and some Nextcloud features may not work at all on Lighttpd.

Shall we move nextcloud to nginx? How can it be done on DietPi?

UPD2: I’ve switched to nginx web server using dietpi-software package installer. It was really easy to do and it works much more stable and much faster than lighttpd. At the moment I can successfully use netatalk (TimeMachine backup), nextcloud with ~70GB of files and RPI-Monitor. All of this with 170-200MB of RAM consumed (on RPi3 board). Let’s see it in the long run. So great! Thanks again for this great distro and support.

Thanks for your help!