Pro report generate Hight cpu and server crash

Using Mainwp with gridpane on a 2 cpu upcloud server.

i keep getting ultra high cpu and server crash.

I can’t generate the reports for my customers :frowning:

it’s seems to be correlated to the number of report to download.

2 its ok 20 its not

Hey @heavestudio

Can you please post the community system report from your MainWP Dashboard for review? The report is located in your Dashboard under Info → Server, on the top right of the page.

Be sure to use the button like the one below; this button hides all your private information:

image

Pressing the button auto-copies the report to your clipboard then just paste it in a reply here.

here it is :


### WordPress Check                Obligatoire                                            Détecté                                      État     ###

MultiSite Disabled                 =true                                                  true                                         Ok          
Méthode fichier système            = direct                                               direct                                       Ok          
WordPress Memory Limit             >=64M                                                  256M                                         Ok          
WordPress Version                  >=6.2                                                  42                                           Ok          

### PHP                            Obligatoire                                            Détecté                                      État     ###

cURL Extension Enabled             =true                                                  true                                         Ok          
cURL Timeout                       >=300 seconds                                          300                                          Ok          
cURL Version                       >=7.29.0                                               7.68.0                                       Ok          
Extensions PHP chargées            Indisponible                                           Core, FFI, PDO, Phar, Reflection, SPL, SimpleXML, Zend OPcache, bcmath, calendar, cgi-fcgi, ctype, curl, date, dom, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, igbinary, imagick, imap, intl, json, libxml, mbstring, memcached, msgpack, mysqli, mysqlnd, openssl, pcre, pdo_mysql, pdo_sqlite, posix, readline, redis, session, shmop, soap, sockets, sodium, sqlite3, standard, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, xml, xmlreader, xmlrpc, xmlwriter, xsl, zip, zlib            
Fonctions PHP désactivées          Indisponible                                           Aucune fonction désactivée.                              
OpenSSL Version                    >=OpenSSL/1.1.0                                        OpenSSL/1.1.1f                               Ok          
OpenSSL Working Status             Yes                                                    Yes                                          Ok          
PCRE Backtracking Limit            >=10000                                                1000000                                      Ok          
PHP autorise les URLs fopen        Indisponible                                           OUI                                                      
PHP Max Execution Time             >=30 seconds                                           300                                          Ok          
PHP Max Input Time                 >=30 seconds                                           60                                           Ok          
PHP Memory Limit                   >=256M                                                 256M                                         Ok          
PHP Post Max Size                  >=2M                                                   512M                                         Ok          
PHP Safe Mode Disabled             =true                                                  true                                         Ok          
PHP Upload Max Filesize            >=2M                                                   512M                                         Ok          
PHP Version                        >=7.4                                                  8.1.27                                       Ok          
SSL Extension Enabled              =true                                                  true                                         Ok          
SSL Warnings                       = empty                                                error:24070079:random number generator:RAND_write_file:Cannot open file
error:2406F079:random number generator:RAND_load_file:Cannot open fileAvertissement
Support PHP Exif                   Indisponible                                           OUI                                                      
Support PHP IPTC                   Indisponible                                           OUI                                                      
Support PHP XML                    Indisponible                                           OUI                                                      

### MySQL                          Obligatoire                                            Détecté                                      État     ###

Encodage client MySQL              Indisponible                                           utf8                                                     
Mode MySQL                         Indisponible                                           ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION            
MySQL Version                      >=5.0                                                  8.0.35-27                                    Ok          

### Configuration serveur          Valeur détectée                                     ###

Agent utilisateur                  Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36
Architecture                       64		 bit                                               
Connexion automatique du serveur   Réponse du corps HTTP non espérée :                    
Contenu accepté                    text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8
HTTPS                              OUI                                                    
Interface de passerelle            CGI/1.1                                                
Jeu de caractère accepté pour le contenuIndisponible                                           
Logiciel du serveur                nginx/1.21.6                                           
Protocole du serveur               HTTP/2.0                                               
Système d'exploitation             Linux                                                  
Temps de la requête                1709743968                                             
Utilisation de la mémoire          15.11 MB                                               

### MainWP Dashboard Settings      Valeur détectée                                     ###

Basic uptime monitoring enabled    Oui                                                    
Délai minimum entre les requêtes   600                                                    
Délai minimum entre les requêtes vers la même IP1000                                                   
MainWP legacy backups enabled      Non                                                    
Nombre maximal de pages à retourner                                                       
Nombre maximal de requêtes d’installation et de mise à jour simultanées2                                                      
Nombre maximal d’articles à retourner                                                       
Nombre maximum de requêtes de synchronisation simultanées2                                                      
Number of connected sites          37                                                     
Optimize data loading              Oui                                                    
Plugin advanced automatic updates enabledNon                                                    
Primary backup system              Anciennes sauvegardes MainWP                           
Requêtes simultanées maximum       1                                                      
Requêtes simultanées maximum par IP1                                                      
REST API enabled                   Non                                                    
Site health monitoring enabled     Oui                                                    
Theme advanced automatic updates enabledOui                                                    
Tolérance d’abandon des extensions/thèmes200                                                    
Utiliser WP Cron                   Oui                                                    
Version de MainWP Dashboard        Latest: 5.0.1 | Detected: 5.0.1 Ok                     
WP Core advanced automatic updates enabledNon                                                    

### Extensions                     Version                                                Licence                                      État     ###

Advanced Uptime Monitor Extension  5.3                                                    Actif                                        Ok          
MainWP Cache Control Extension     5.0                                                    Actif                                        Ok          
MainWP Cost Tracker Assistant Extension5.0                                                    Actif                                        Ok          
MainWP Custom Dashboard Extension  5.0                                                    Actif                                        Ok          
MainWP Database Updater Extension  5.0                                                    Actif                                        Ok          
MainWP Domain Monitor Extension    5.0.1                                                  Actif                                        Ok          
MainWP Google Analytics Extension  5.0                                                    Actif                                        Ok          
MainWP Lighthouse Extension        5.0                                                    Actif                                        Ok          
MainWP Maintenance Extension       5.0                                                    Actif                                        Ok          
MainWP Pro Reports Extension       5.0                                                    Actif                                        Ok          
MainWP SSL Monitor Extension       5.0                                                    Actif                                        Ok          
MainWP Time Tracker Extension      5.0                                                    Actif                                        Ok          
MainWP Virusdie Extension          5.0                                                    Actif                                        Ok          
MainWP Vulnerability Checker Extension5.0                                                    Actif                                        Ok          
MainWP White Label Extension       5.0                                                    Actif                                        Ok          
MainWP WooCommerce Status Extension5.0.1                                                  Actif                                        Ok          

### Extension                      Version                                                État                                      ###

Akismet Anti-spam: Spam Protection 5.3.1                                                  Inactif                                      
FluentSMTP                         2.2.71                                                 Actif                                        
MainWP API Backups Extension - BETA4.0.06                                                 Inactif                                      
MainWP Dashboard                   5.0.1                                                  Actif                                        
Nginx Helper                       2.2.4                                                  Inactif                                      
Password Protected                 2.6.8                                                  Actif                                        
Redis Object Cache                 2.5.1                                                  Inactif                                      
WP fail2ban                        5.2.2.1                                                Actif                                        

Thanks for the system reports.

Your memory limits should be sufficient for your number of child sites.

Does anything get logged in your debug/error logs when your server crashes?
And how does the crash manifest? Does it just time out, or do you have to restart it?

Another thing you can try is to disable some of the Report data and then try to download 20 PDFs again.
Perhaps it’s only some data sets that are more problematic than others.

i have some nginx error :

2024/03/07 08:52:01 [error] 77632#77632: *1667 FastCGI sent in stderr: “PHP message: WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘groups = “” AND clients = “” AND ( product_type = “plugin” OR product_type = "th’ at line 1 for query SELECT * FROM wpyr_mainwp_cost_tracker WHERE groups = “” AND clients = “” AND ( product_type = “plugin” OR product_type = “theme” ) made by do_action(‘wp_ajax_mainwp_syncsites’), WP_Hook->do_action, WP_Hook->apply_filters, MainWP\Dashboard\MainWP_Post_Site_Handler->mainwp_syncsites, do_action(‘mainwp_after_sync_site_success’), WP_Hook->do_action, WP_Hook->apply_filters, MainWP\Extensions\CostTrackerAssistant\MainWP_Cost_Tracker_Assistant_Hooks->hook_after_sync_site_success, MainWP\Extensions\CostTrackerAssistant\MainWP_Cost_Tracker_Assistant_DB->get_cost_tracker_plugin_theme_with_sites_selected” while reading response header from upstream, client: 138.199.16.88, server: mysite.com, request: “POST /wp-admin/admin-ajax.php HTTP/2.0”, upstream: “fastcgi://unix:/var/run/php/php81-fpm-mysite.com.sock:”, host: “mysite.com”, referrer: “mysite.com/wp-admin/admin.php?page=managesites

Also :

2024/03/07 08:59:51 [error] 77633#77633: *1978 limiting requests, excess: 6.032 by zone “wp”

also this [07-Mar-2024 08:15:15 UTC] PHP Fatal error: Uncaught TypeError: Unsupported operand types: string + string in /var/www/mysite.com/wp-content/plugins/mainwp-domain-monitor-extension/class/class-mainwp-domain-monitor-schedule.php:308

Thank you for the error logs, @heavestudio .

Our development team will look into two of those errors.

The log most relevant for the high cpu and server crash issue you’re running into is this:
2024/03/07 08:59:51 [error] 77633#77633: *1978 limiting requests, excess: 6.032 by zone “wp”

It appears that this is occurring because of too many requests being made in a short period, so it’s getting rate-limited to prevent excessive load.

It might be best to contact your hosting provider for exact information about that error log and what would be the best approach to avoid running into that situation in the future (e.g. getting more CPU cores)

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.