<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[iRedMail — 504 Gateway Timeout when using Webmail]]></title>
		<link>https://forum.iredmail.org/topic20248-504-gateway-timeout-when-using-webmail.html</link>
		<atom:link href="https://forum.iredmail.org/feed-rss-topic20248.xml" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in 504 Gateway Timeout when using Webmail.]]></description>
		<lastBuildDate>Wed, 24 Jan 2024 03:51:32 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: 504 Gateway Timeout when using Webmail]]></title>
			<link>https://forum.iredmail.org/post88166.html#p88166</link>
			<description><![CDATA[<p>Thanks for sharing. <img src="https://forum.iredmail.org/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></description>
			<author><![CDATA[null@example.com (ZhangHuangbin)]]></author>
			<pubDate>Wed, 24 Jan 2024 03:51:32 +0000</pubDate>
			<guid>https://forum.iredmail.org/post88166.html#p88166</guid>
		</item>
		<item>
			<title><![CDATA[Re: 504 Gateway Timeout when using Webmail]]></title>
			<link>https://forum.iredmail.org/post88165.html#p88165</link>
			<description><![CDATA[<p>Hi Zhang and @RikuS</p><p>Thanks for the link.&nbsp; My Roundcube is working again :-) </p><p>Something about php / localhost and dovecot login via ssl is broken !</p><p>It does mean anyone can now authenticate with plain text login I assume however.</p><br /><p>My custom php script is still not working reliably (it works sometimes, but times out at logon stage 1 out of 3 times. However it&#039;s still using ssl to connect to dovecot, so I&#039;ll do some research on how to get that connecting using plain text.</p><p>I ended up changing:</p><p>1)&nbsp; /opt/iredmail/custom/dovecot/conf-enabled/ssl.conf<br />...<br />ssl = yes<br />disable_plaintext_auth = no<br />...</p><p>2) /opt/www/roundcubemail/config/config.inc.php <br />...<br />// IMAP<br />$config[&#039;default_host&#039;] = &#039;127.0.0.1&#039;; <br />$config[&#039;default_port&#039;] = 143; <br />//$config[&quot;imap_host&quot;] = &quot;&quot;;<br />...<br />// SMTP<br />$config[&#039;smtp_server&#039;] = &#039;tls://127.0.0.1&#039;;<br />$config[&#039;smtp_port&#039;] = 587;<br />//$config[&quot;smtp_host&quot;] = &quot;&quot;;<br />...</p><br /><p>I then restarted dovecot and all go.</p><br /><p>Note: I tried adding the above settings to: /opt/iredmail/custom/roundcube/custom.inc.php<br />However, this introduced a new &#039;mail server&#039; field at logon and I wasn&#039;t able to send emails.<br />I guess I&#039;ll need to check this after doing an update.</p><br /><p>Kent.</p>]]></description>
			<author><![CDATA[null@example.com (kent@kamar.nz)]]></author>
			<pubDate>Tue, 23 Jan 2024 07:59:53 +0000</pubDate>
			<guid>https://forum.iredmail.org/post88165.html#p88165</guid>
		</item>
		<item>
			<title><![CDATA[Re: 504 Gateway Timeout when using Webmail]]></title>
			<link>https://forum.iredmail.org/post88160.html#p88160</link>
			<description><![CDATA[<div class="quotebox"><cite>ZhangHuangbin wrote:</cite><blockquote><p>I received reports from other iRedMail server admins before, few times, but for different Roundcube versions. I didn&#039;t figure out the cause and no solution at the end.<br />Some admins solved the issue by upgrading OS.</p><p>We may need Roundcube developers to help troubleshoot, but it&#039;s not what i can do.</p></blockquote></div><p>Hi Zhang and kent@kamar.nz,</p><p>I had the same issue and reverting couple Roundcube settings fixed it for me. Never figured out why this actually happens, as for many the new config version works but few are having this same issue.</p><p>See my post here <a href="https://forum.iredmail.org/post86738.html#p86738">https://forum.iredmail.org/post86738.html#p86738</a></p><p>I would suggest to reverting the relevant configs and see how it goes.</p>]]></description>
			<author><![CDATA[null@example.com (RikuS)]]></author>
			<pubDate>Mon, 22 Jan 2024 18:43:00 +0000</pubDate>
			<guid>https://forum.iredmail.org/post88160.html#p88160</guid>
		</item>
		<item>
			<title><![CDATA[Re: 504 Gateway Timeout when using Webmail]]></title>
			<link>https://forum.iredmail.org/post88153.html#p88153</link>
			<description><![CDATA[<p>Hi Zhang,</p><p>I&#039;m running on Debian 10 (Buster) - any issues updating to Debian 12 (Bookworm) ?</p><p>Kent.</p>]]></description>
			<author><![CDATA[null@example.com (kent@kamar.nz)]]></author>
			<pubDate>Mon, 22 Jan 2024 02:45:53 +0000</pubDate>
			<guid>https://forum.iredmail.org/post88153.html#p88153</guid>
		</item>
		<item>
			<title><![CDATA[Re: 504 Gateway Timeout when using Webmail]]></title>
			<link>https://forum.iredmail.org/post88152.html#p88152</link>
			<description><![CDATA[<p>Hi Zhang,</p><p>I&#039;m getting the same timeout with a php script we are using to check a specific email address - nothing to do with WebMail.</p><p>This is a basic php script which logs on and then pulls down any emails sent to that account.</p><p>$server = &#039;{mail.kamar.nz:995/pop3/ssl/novalidate-cert}INBOX&#039;;<br />$connection = imap_open( $server, $user, $pswd );<br />$info = imap_check( $connection );<br />if( $info-&gt;Nmsgs == 0 ) { imap_close( $connection ); }<br />etc.</p><p>Error:<br />-----------<br />upstream timed out (110: Connection timed out) while reading response header from upstream, client, request: &quot;GET /checkmail.php&quot;, upstream: &quot;fastcgi://127.0.0.1:9001&quot;</p><p>Kent.</p>]]></description>
			<author><![CDATA[null@example.com (kent@kamar.nz)]]></author>
			<pubDate>Mon, 22 Jan 2024 02:35:08 +0000</pubDate>
			<guid>https://forum.iredmail.org/post88152.html#p88152</guid>
		</item>
		<item>
			<title><![CDATA[Re: 504 Gateway Timeout when using Webmail]]></title>
			<link>https://forum.iredmail.org/post88147.html#p88147</link>
			<description><![CDATA[<p>I received reports from other iRedMail server admins before, few times, but for different Roundcube versions. I didn&#039;t figure out the cause and no solution at the end.<br />Some admins solved the issue by upgrading OS.</p><p>We may need Roundcube developers to help troubleshoot, but it&#039;s not what i can do.</p>]]></description>
			<author><![CDATA[null@example.com (ZhangHuangbin)]]></author>
			<pubDate>Mon, 22 Jan 2024 02:19:47 +0000</pubDate>
			<guid>https://forum.iredmail.org/post88147.html#p88147</guid>
		</item>
		<item>
			<title><![CDATA[Re: 504 Gateway Timeout when using Webmail]]></title>
			<link>https://forum.iredmail.org/post88143.html#p88143</link>
			<description><![CDATA[<p>Hi Zhang,<br />I wouldn&#039;t say it&#039;s that busy. ~20 users using iMap.</p><p>No log entry in dovecot.log, imap.log, lda.log or pop3.log with&nbsp; &#039;_limit&#039;</p><br /><p>Also - this only appears to be affecting php logons (eg. WebMail).&nbsp; No issues with desktop clients checking via imap.</p><p>Kent.</p>]]></description>
			<author><![CDATA[null@example.com (kent@kamar.nz)]]></author>
			<pubDate>Mon, 22 Jan 2024 02:10:16 +0000</pubDate>
			<guid>https://forum.iredmail.org/post88143.html#p88143</guid>
		</item>
		<item>
			<title><![CDATA[Re: 504 Gateway Timeout when using Webmail]]></title>
			<link>https://forum.iredmail.org/post88133.html#p88133</link>
			<description><![CDATA[<p>Is this a busy IMAP server and reached max client limit (search &quot;_limit&quot; in /var/log/dovecot/*.log)?</p>]]></description>
			<author><![CDATA[null@example.com (ZhangHuangbin)]]></author>
			<pubDate>Mon, 22 Jan 2024 01:57:37 +0000</pubDate>
			<guid>https://forum.iredmail.org/post88133.html#p88133</guid>
		</item>
		<item>
			<title><![CDATA[Re: 504 Gateway Timeout when using Webmail]]></title>
			<link>https://forum.iredmail.org/post88130.html#p88130</link>
			<description><![CDATA[<p>Hi Zhang,</p><p>Any ideas ?</p><p>Kent.</p>]]></description>
			<author><![CDATA[null@example.com (kent@kamar.nz)]]></author>
			<pubDate>Sun, 21 Jan 2024 07:38:30 +0000</pubDate>
			<guid>https://forum.iredmail.org/post88130.html#p88130</guid>
		</item>
		<item>
			<title><![CDATA[Re: 504 Gateway Timeout when using Webmail]]></title>
			<link>https://forum.iredmail.org/post88095.html#p88095</link>
			<description><![CDATA[<p>Hi Zhang,</p><p>Users using regular clients, connecting via iMap don&#039;t appear to be having any issues. I have another php script which checks email and I can also see it reporting the same error in the logs (though it does complete eventually but has a longer timeout.</p><p>Agree, the delay does appear to be during the logon stage.</p><p>Kent.</p>]]></description>
			<author><![CDATA[null@example.com (kent@kamar.nz)]]></author>
			<pubDate>Mon, 15 Jan 2024 08:59:24 +0000</pubDate>
			<guid>https://forum.iredmail.org/post88095.html#p88095</guid>
		</item>
		<item>
			<title><![CDATA[Re: 504 Gateway Timeout when using Webmail]]></title>
			<link>https://forum.iredmail.org/post88094.html#p88094</link>
			<description><![CDATA[<div class="quotebox"><cite>ZhangHuangbin wrote:</cite><blockquote><p>Any related error in Dovecot? seems login toke too long.</p></blockquote></div><br /><p>Nothing in the dovecot.log, but I did see this in the imap.log file right when the timeout occurred.<br />------------<br />Jan 15 21:33:40 mail dovecot: imap-login: Login: user=&lt;kent@kamar.nz&gt;, method=LOGIN, rip=127.0.0.1, lip=127.0.0.1, TLS, TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)<br />Jan 15 21:33:40 mail dovecot: imap(kent@kamar.nz)&lt;30955&gt;&lt;c8RY2/cOdpN/AAAB&gt;: Connection closed (No commands sent) in=0 out=441 deleted=0 expunged=0 trashed=0 hdr_count=0 hdr_bytes=0 body_count=0 body_bytes=0</p>]]></description>
			<author><![CDATA[null@example.com (kent@kamar.nz)]]></author>
			<pubDate>Mon, 15 Jan 2024 08:37:29 +0000</pubDate>
			<guid>https://forum.iredmail.org/post88094.html#p88094</guid>
		</item>
		<item>
			<title><![CDATA[Re: 504 Gateway Timeout when using Webmail]]></title>
			<link>https://forum.iredmail.org/post88091.html#p88091</link>
			<description><![CDATA[<p>Any related error in Dovecot? seems login toke too long.</p>]]></description>
			<author><![CDATA[null@example.com (ZhangHuangbin)]]></author>
			<pubDate>Mon, 15 Jan 2024 01:14:10 +0000</pubDate>
			<guid>https://forum.iredmail.org/post88091.html#p88091</guid>
		</item>
		<item>
			<title><![CDATA[Re: 504 Gateway Timeout when using Webmail]]></title>
			<link>https://forum.iredmail.org/post88090.html#p88090</link>
			<description><![CDATA[<p>Hi Zhang,</p><p>/var/log/php-fpm/php-fpm.log<br />----<br />Jan 15 07:47:27 mail php-fpm[919]: [WARNING] [pool inet] child 7107, script &#039;/opt/www/roundcubemail/index.php&#039; (request: &quot;POST /index.php?_task=login&quot;) executing too slow (22.609977 sec), logging</p><br /><p>/var/log/php-fpm/slow.log<br />----<br />[15-Jan-2024 07:47:27]&nbsp; [pool inet] pid 7107<br />script_filename = /opt/www/roundcubemail/index.php<br />[0x00007fe8bc41d940] fgets() /opt/www/roundcubemail-1.6.5/program/lib/Roundcube/rcube_imap_generic.php:212<br />[0x00007fe8bc41d8a0] readLine() /opt/www/roundcubemail-1.6.5/program/lib/Roundcube/rcube_imap_generic.php:332<br />[0x00007fe8bc41d7b0] readReply() /opt/www/roundcubemail-1.6.5/program/lib/Roundcube/rcube_imap_generic.php:772<br />[0x00007fe8bc41d5c0] authenticate() /opt/www/roundcubemail-1.6.5/program/lib/Roundcube/rcube_imap_generic.php:991<br />[0x00007fe8bc41d4c0] connect() /opt/www/roundcubemail-1.6.5/program/lib/Roundcube/rcube_imap.php:172<br />[0x00007fe8bc41d390] connect() /opt/www/roundcubemail-1.6.5/program/include/rcmail.php:780<br />[0x00007fe8bc41d1e0] login() /opt/www/roundcubemail-1.6.5/index.php:119</p>]]></description>
			<author><![CDATA[null@example.com (kent@kamar.nz)]]></author>
			<pubDate>Sun, 14 Jan 2024 18:50:24 +0000</pubDate>
			<guid>https://forum.iredmail.org/post88090.html#p88090</guid>
		</item>
		<item>
			<title><![CDATA[Re: 504 Gateway Timeout when using Webmail]]></title>
			<link>https://forum.iredmail.org/post88079.html#p88079</link>
			<description><![CDATA[<p>- Port 9001 is php-fpm service configured by iRedMail Easy.<br />- Is php-fpm service running? Any related error in /var/log/php-fpm/*.log?</p>]]></description>
			<author><![CDATA[null@example.com (ZhangHuangbin)]]></author>
			<pubDate>Sun, 14 Jan 2024 14:58:44 +0000</pubDate>
			<guid>https://forum.iredmail.org/post88079.html#p88079</guid>
		</item>
		<item>
			<title><![CDATA[Re: 504 Gateway Timeout when using Webmail]]></title>
			<link>https://forum.iredmail.org/post88023.html#p88023</link>
			<description><![CDATA[<p>Thanks for the reply - it&#039;s not the firewall.&nbsp; This is a localhost only port.</p>]]></description>
			<author><![CDATA[null@example.com (kent@kamar.nz)]]></author>
			<pubDate>Thu, 04 Jan 2024 20:02:56 +0000</pubDate>
			<guid>https://forum.iredmail.org/post88023.html#p88023</guid>
		</item>
	</channel>
</rss>
