Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

App breaks when php max children reached #3116

Closed
jacksbox opened this issue Aug 9, 2023 · 6 comments
Closed

App breaks when php max children reached #3116

jacksbox opened this issue Aug 9, 2023 · 6 comments
Labels
0. Needs triage Pending approval or rejection. This issue is pending approval. bug Something isn't working

Comments

@jacksbox
Copy link

jacksbox commented Aug 9, 2023

Steps to reproduce

  1. Use a slow server with 1 core (no also tested with 2 cores, same problem)
  2. Open Photos or Memories app with lots of ungenerated previews
  3. Scroll
  4. Nextcloud completely shuts down and does not recover

The issue seems to be, that all the preview generation request start new php processes with own database connections.
This will fast reach the max_children settings.
Guess that is ok, but after this limit is reached, it seems like the connections are never released and thus the database is blocked indefinitely.
Nextcloud is now not accessible anymore and the only way to get it running again is to restart the container.
That seems not acceptable (badly formulated, sorry) - I think it needs to be made sure that it will always recover from errors like this.

Expected behavior

Nextcloud should always recover from errors

Actual behavior

Nextcloud does not recover and needs to be restarted

Host OS

Ubuntu 22.04

Nextcloud AIO version

7.4.0

Current channel

latest

Other valuable info

Nextcloud container log

[09-Aug-2023 07:14:06] WARNING: [pool www] server reached max_children setting (38), consider raising it

DB container log:

...
2023-08-09 07:14:12.491 UTC [345] FATAL:  remaining connection slots are reserved for non-replication superuser connections
2023-08-09 07:14:12.536 UTC [346] FATAL:  remaining connection slots are reserved for non-replication superuser connections
2023-08-09 07:14:12.570 UTC [347] FATAL:  remaining connection slots are reserved for non-replication superuser connections
2023-08-09 07:14:12.602 UTC [348] FATAL:  remaining connection slots are reserved for non-replication superuser connections
2023-08-09 07:14:12.629 UTC [349] FATAL:  remaining connection slots are reserved for non-replication superuser connections
2023-08-09 07:14:12.657 UTC [350] FATAL:  remaining connection slots are reserved for non-replication superuser connections
2023-08-09 07:14:12.686 UTC [351] FATAL:  remaining connection slots are reserved for non-replication superuser connections
2023-08-09 07:14:12.724 UTC [352] FATAL:  remaining connection slots are reserved for non-replication superuser connections
2023-08-09 07:14:12.751 UTC [353] FATAL:  remaining connection slots are reserved for non-replication superuser connections
2023-08-09 07:14:12.780 UTC [354] FATAL:  remaining connection slots are reserved for non-replication superuser connections
2023-08-09 07:14:12.821 UTC [355] FATAL:  remaining connection slots are reserved for non-replication superuser connections
@jacksbox jacksbox added 0. Needs triage Pending approval or rejection. This issue is pending approval. bug Something isn't working labels Aug 9, 2023
@jacksbox jacksbox changed the title App breaks when php max children reached (memories app) App breaks when php max children reached Aug 9, 2023
@th0rgall
Copy link

th0rgall commented Aug 9, 2023

I have the same issue. I'm trying out a default AiO install (with Nextcloud 27) on an old laptop with 4GB RAM and a dual-core processor (Celeron 2955U). After opening some of the sample files with the admin account on two different clients, my Nextcloud also got blocked in a matter of minutes.

My max_children count is 77, double the OP's 38 with one extra, which makes me guess that this limit is dynamically set according to the estimated power of the system (number of cores?).

[10-Aug-2023 01:44:35] WARNING: [pool www] server reached max_children setting (77), consider raising it

From a quick search, it seems that there are multiple related issues:

It's probably worthwhile to play with the configuration values mentioned there, but I don't know directly where they should be configured in AiO.

@szaimen
Copy link
Collaborator

szaimen commented Aug 10, 2023

Hi, can you upgrade to v7.0.0 Beta and check if that resolves things? See https://github.com/nextcloud/all-in-one#how-to-switch-the-channel

@szaimen szaimen closed this as completed Aug 10, 2023
@jacksbox
Copy link
Author

Nope, that does not really help - only change, nextcloud not completely shuts down forever, but recovers after 5min.
But this still makes the photos and memories app unusable.

PS: a bit weird to close as completed without waiting if it is actually solved?

@szaimen
Copy link
Collaborator

szaimen commented Aug 12, 2023

How much ram do you have and which optional addons do you have enabled?

@jacksbox
Copy link
Author

2GB, 2 CPUS

Only imaginary is active

@szaimen
Copy link
Collaborator

szaimen commented Aug 13, 2023

Hm..

@nextcloud nextcloud locked and limited conversation to collaborators Aug 13, 2023
@szaimen szaimen converted this issue into discussion #3149 Aug 13, 2023

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
0. Needs triage Pending approval or rejection. This issue is pending approval. bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants