1

Topic: Server error(Bad Gateway)

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release):  0.9.9 MARIADB edition.
- Deployed with iRedMail Easy or the downloadable installer? Download installer
- Linux/BSD distribution name and version: Debian 9.9 Stretch
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? NO
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====
Hi!
When i search something, i have an error "Bad Gateway". I change max_execution_time in php.ini to 90 - no result.
This is tail log NGINX
===========
2019/09/02 15:21:01 [error] 819#819: *1927 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 192.168.3.108, server: _, request: "GET /mail/?_task=mail&_action=search&_filter=ALL&_interval=&_q=0826&_headers=text&_scope=base&_mbox=Sent&_remote=1&_unlock=loading1567426846052&_=1567424131246 HTTP/1.1", upstream: "fastcgi://127.0.0.1:9999", host: "mail.dezfirma.ru", referrer: "https://mail.dezfirma.ru/mail/?_task=ma … _mbox=Sent"

Post's attachments

Снимок.PNG
Снимок.PNG 52.08 kb, file has never been downloaded. 

You don't have the permssions to download the attachments of this post.

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Server error(Bad Gateway)

- Make sure that nothing is blocking port 9999 from internal localhost access.

- Have you checked the log of you php-fpm? It might tell you a better insight about the problem.

- Enable debugging in PHP first so the error will be detailed in the php-fpm logs.

- Have you tried checking how many child processes does your php fast-cgi have? Check by typing "pstree" to see how many are being created. If you have a busy website, your php-fpm setup might not be adapting to the load and therefore you need to increase the number of child processes. From what you have written, it looks like one of the child processes is not available and timed-out.

- Is this error isolated in Roundcube? Or are you experiencing the same time-outs with Wordpress or other php applications?

3

Re: Server error(Bad Gateway)

I change "request_terminate_timeout" in /etc/php/7.0/fpm/pool.d/www.conf to 300 sec and it works
thanks

jasongo wrote:

- Make sure that nothing is blocking port 9999 from internal localhost access.

- Have you checked the log of you php-fpm? It might tell you a better insight about the problem.

- Enable debugging in PHP first so the error will be detailed in the php-fpm logs.

- Have you tried checking how many child processes does your php fast-cgi have? Check by typing "pstree" to see how many are being created. If you have a busy website, your php-fpm setup might not be adapting to the load and therefore you need to increase the number of child processes. From what you have written, it looks like one of the child processes is not available and timed-out.

- Is this error isolated in Roundcube? Or are you experiencing the same time-outs with Wordpress or other php applications?