YunoHost-Apps / nextcloud_ynh

Nextcloud package for YunoHost
https://nextcloud.com/
GNU Affero General Public License v3.0
147 stars 63 forks source link

502 Gateway Time-out #625

Closed Crashone closed 3 months ago

Crashone commented 10 months ago

Describe the bug

Each time I navigate through files via the web interface, Nextcloud server is no longer responding and ended with a 502 Gateway Time-out :

Screenshot_20231110_150614

Other applications are not affected, and I can still connect to Yunohost web interface.

Context

Logs

/var/log/ngnix/MyNextcloudURL-error.log :

alexAubin commented 10 months ago

Can you check that the service php8.2-fpm is up and running (in Tools > Services)

Crashone commented 10 months ago

Can you check that the service php8.2-fpm is up and running (in Tools > Services)

Yes it is.

Crashone commented 10 months ago

Here the full log : Nginx : https://paste.yunohost.org/vikahiyoxu

php8.2-fpm https://paste.yunohost.org/aduwefavop

php only indicates "[10-Nov-2023 23:56:37] WARNING: [pool nextcloud] server reached pm.max_children setting (8), consider raising it". If I restart php8.2-fpm, I can access to Nextcloud, but the server crashes again as soon as I start navigating through files.

tio-trom commented 10 months ago

Yes happens to me too. You have to increase some numbers. Go to /etc/php/8.2/fpm/pool.d and edit the file nextcloud.conf.


pm = static
pm.max_children = 100
pm.max_requests = 500
request_terminate_timeout = 1d

I added pm.max_children = 100 and with my server's resources it works well. Test to see how much you need. Make sure to restart the php-fpm after you do any changes in order for them to take effect.

Crashone commented 10 months ago

Thank you for this solution.

alexAubin commented 3 months ago

Closing because the issue appears to be fixed by tweaking the pm settings