I just installed php, mysql, nginx, sendmail on debian 6.
Now the PHP pages work fine. But when I try to use a simple mail()
test:
Example: mail($to, $sub, $msg)
it takes too long to finish (around 30+secs) then get I 504 Gateway Time-out
in my browser.
Funny thing is the email is actually sent.
BTW this is the error from the log:
upstream timed out (110: Connection timed out) while reading response header from upstream
Anybody knows what's causing this error?
504 Gateway Timeout Error on Nginx + FastCGI (PHP-FPM) ini . Open the file and add/change the value for the max_execution_time directive to 300 seconds. Reload Nginx and PHP-FPM for the changes to take effect.
Nginx 504 - Timeout error One of the most common reasons for a 504 Gateway Timeout error is a server problem. If your web server is running on Nginx, for example, and you are receiving an Nginx 504 error, then you can try increasing a few of your config settings.
A 504 Gateway Timeout Error means your web server didn't receive a timely response from another server upstream when it attempted to load one of your web pages. Put simply, your web servers aren't communicating with each other fast enough.
I think the problem in your sendmail. I recommend to install Postfix instead of sendmail and configure it in php.ini
. Then check your mail()
function.
Also you can try to use sendmail directly instead of using mail- function.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With