I am using PHP 7 SoapClient and all works well except long time requests like creating account with domain. It take aprox. 30 sec. and __soapCall go down with (104, ‘Connection reset by peer’) which means timeout. Somewhere I read that SoapClient using https connection has problem to extend this connection timeout with ini_set(‘default_socket_timeout’, 5000);. Simple it is not accepted and is timedout after 5 seconds.
How to fix it?
HI Standus
I would open a support ticket and let IW have a look as it is an area I am not familiar with sorry.
Perhaps another forum member may have an idea
Many thanks
John
All is described here
Hi Standus
Many thanks
Looking at your posts, I see error 104 not error 500.
So if error 104, in your php logs, do you see anything similar to this
(104)Connection reset by peer:
mod_fcgid: error reading data from FastCGI server
if so, what is displayed after peer;
If looking your link, at the end of is shows as below
Have you tried that to set default socket timeout
Lastly, which php-fpm version 7 have you tried to change - IW-php-fpm is the one to change for timeout upload limits etc…
Many thanks
John
------- Quote -------
Please note that although you may try to set default_socket_timeout to something over 20s, you may get tricked by the Linux kernel.
The default value of tcp_syn_retries is set to 5, which will effectively timeout any TCP connection after roughly 20s, no matter what limits you set in PHP higher than this.
The value can be altered by root only, like this:
echo 6 > /proc/sys/net/ipv4/tcp_syn_retries
A value of 6, as above, will give you a timeout up to ~45s.
Browser show error 500 and in log is
(104)Connection reset by peer: FastCGI: comm with server “remi-safe-php73.fcgi” aborted: read failed
at different time when 500 goes.
using
echo 6 > /proc/sys/net/ipv4/tcp_syn_retries
has no effect.
set default socket timeout has no effect.
PHP-FPM 7.3.14
remi-safe
Just now I tested with PHP-FPM 7.4.2 and timeout is little longer aprox. 20 seconds. But its still short because I got also error 500. Another timeouts are around 8 seconds.
I am testing “Controller: /nodeworx/siteworx” and Action: add , it takes long time.
Hi Standus
Sorry that didn’t work, but worth a try
I see your adjusting php-fpm for siteworx users and not IW php-fpm as that should be php-fpm7.2 but not sure of that is the issue.
Actually, if you use opcache (or any cache) test with this disabled/stopped
As I said, I would open a support ticket as I do not have much experience with this issue sorry
Many thanks
John
OK, I will wait to result.