• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion
  • Inviting everyone to the UX test of a new security feature in the WP Toolkit
    For WordPress site owners, threats posed by hackers are ever-present. Because of this, we are developing a new security feature for the WP Toolkit. If the topic of WordPress website security is relevant to you, we would be grateful if you could share your experience and help us test the usability of this feature. We invite you to join us for a 1-hour online session via Google Meet. Select a convenient meeting time with our friendly UX staff here.

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