• Dear Pleskians! The Plesk Forum will be undergoing scheduled maintenance on Monday, 7th of July, at 9:00 AM UTC. The expected maintenance window is 2 hours.
    Thank you in advance for your patience and understanding on the matter.

nginx 502 Error on Sending Forum Emails Via Sendmail

Gene Steinberg

Regular Pleskian
I have an 8-core dedicated server with 16GB RAM, Plesk 12.5.30 update 25 with PHP 7.0.4, PHP-FPM over Apache.

When sending batch text emails via our XenForo forum script (version 1.5.6), which uses sendmail, it times out about a third to two-thirds through the process with an nginx gateway 502 error.

I can find no relevant error logs for Apache or nginx.

XenForo was not able to offer much guidance, except to look for a PHP issue. Should I be allocating more resources in php.ini?

What should I change or set to deal with this problem?

Peace,
Gene
 
Usually, nginx gateway 502 error indicates problems with connection to the backend (Apache in our case). Apache can hang for many different reasons. Restart downtime, for example or something else. First of all, I would suggest you try to enable graceful Apache restart and check how it goes on after that. To enable:

# plesk db
mysql> REPLACE INTO misc VALUES ('restart_apache_gracefully', 'true');

To disable:

mysql> REPLACE INTO misc VALUES ('restart_apache_gracefully', 'false');
 
# plesk db

Reading table information for completion of table and column names

You can turn off this feature to get a quicker startup with -A


Welcome to the MariaDB monitor. Commands end with ; or \g.

Your MariaDB connection id is 239892

Server version: 10.0.24-MariaDB MariaDB Server


Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others.


Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.


MariaDB [psa]> mysql> REPLACE INTO misc VALUES ('restart_apache_gracefully', 'true');

ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'mysql> REPLACE INTO misc VALUES ('restart_apache_gracefully', 'true')' at line 1

MariaDB [psa]>

So?

Peace,
Gene
 
Hi Gene,
you don't need the "mysql>" at the begining of the command...
Code:
MariaDB [psa]> REPLACE INTO misc VALUES ('restart_apache_gracefully', 'true');
Query OK, 1 row affected (0.03 sec)

MariaDB [psa]>

Regards

Lloyd
 
Back
Top