toteph42 / identy_switch

This plugin allows users to switch between different accounts (and check for new mails) in a single Roundcube session.
GNU General Public License v3.0
7 stars 4 forks source link

connection reset by peer #34

Closed pikachurus closed 1 week ago

pikachurus commented 1 week ago

nginx 1.26.2, php-fpm 8.1.30, roundcube 1.6.9 (migrated from ident_switch), identy_switch 1.0.39

when the number of clients started to grow, an error appeared:

2024/10/28 08:37:52 [error] 23989#23989: *231 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 172.17.22.31, server: xxx.xxx, request: "POST /?_task=mail&_action=refresh HTTP/2.0", upstream: "fastcgi://unix:/var/run/php/php8.1-fpm.sock:", host: "xxx.xxx", referrer: "https://xxx.xxx/?_task=mail&_mbox=INBOX"

2024/10/28 08:37:52 [error] 23989#23989: *235 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 192.168.45.137, server: xxx.xxx, request: "POST /?_task=mail&_action=refresh HTTP/2.0", upstream: "fastcgi://unix:/var/run/php/php8.1-fpm.sock:", host: "xxx.xxx", referrer: "https://xxx.xxx/?_task=mail&_mbox=INBOX"

2024/10/28 08:37:52 [error] 23989#23989: *239 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 172.20.18.11, server: mxxx.xxx, request: "POST /?_task=mail&_action=refresh HTTP/2.0", upstream: "fastcgi://unix:/var/run/php/php8.1-fpm.sock:", host: "xxx.xxx", referrer: "https://xxx.xxx/?_task=mail&_mbox=INBOX.SENT"

and so on...

this became 503 error in nginx (for all virtual sites in this instance of nginx)

when i disabled identy_switch in config.php - everything returned to normal

toteph42 commented 1 week ago

identy_switch is working in background and checking all clients by opening a separate session. May be, there were to many session to be handled by nginx. This is in first place a nginx problem, not a problem of my plugin. Please check out your configuration and ask nginx people for help.

If they could not provide any solution, then it may be possible to add a configuration parameter to identiy_switch to limit the number of parallel sessions and add some sort of delay in new mail checking. To be honest, I don't know if such an feature request it's worth for only one user running into that problem.

pikachurus commented 6 days ago

problem with upstream (php8.1-fpm), not nginx Screenshot_20241029_082502

So i increased the parameter value 'pm.max_children' and looks like php acting more stable, so i'll continue to tweak him.