• 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

mod_fcgid: stderr: PHP Fatal error: Allowed memory size of 134217728 bytes exhausted

southsidetech

New Pleskian
Help;

Plesk 11.0.9
PHP 5.3.3
CENTOS 6.4

I am getting the following error when trying to export data results to .xlsx file but if I export to .csv it is fine.

It is not a big data export only 3mb 8000 records from the db.

mod_fcgid: stderr: PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 72 bytes) in

I have tried all the increasing memory_limit etc but nothing works.

Stewart
 
IgorG;

I running a report using a php export script page at the following URL, which works fine for dozens of other reports in XLSX format and this particular report in question if you do not select all records but just about 4000 max if you select all 8000 it errors:

The query seems quick and fine on all reports.

https://www.domain.com/v1/reports2/export.php

I have tried adding the memory_limit 256M and also tried memory_limit 512M in the following files.

1. /etc/php.ini
2. .htaccess in the root of the v1 folder
3. In the export.php file itself
4. In Plesk within the domain PHP settings changing the default to custom value

I also looked at the /etc/httpd/conf.d/fcgid.conf file vales and changed the IOTimeout and reconfigured the domain.com in question.

None of the worked.

To expand I am running a report which is built using PHPRunner product that sits in the reports2 subdirectory of the domain.com root. http://www.xlinesoft.com/phprunner/index.htm

The thing is the report runs fine if I export to CSV all values but if XLSX it crashes out.

It works fine on the companies test server that writes the PHPRunner software they say it is a memory limit issue.

Hope this helps.

Stewart
 
IgorG

Forgot to say when the memory_limit is 128M

You get the following error in the browser:

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 93 bytes) in /var/www/vhosts/domain.com/httpdocs/v1/reports2/plugins/PHPExcel/Worksheet.php on line 961

The file changes each time so it is not the file or line 961.

If you increase the memory limit to 512M you get a 500 internal server error page instead.

This is what appears in the plesk domain level error_log

[Wed Sep 26 10:39:42 2012] [warn] [client IP] mod_fcgid: stderr: PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 72 bytes) in /var/www/vhosts/domain.com/httpdocs/v1/reports2/plugins/PHPExcel/Style/Color.php on line 399, referer: https://www.domain.com/v1/reports2/export.php?
 
I can suppose only that increasing memory_limit in global php.ini should help. Most probably there is some special additional setting in configs of this plugin.
 
Igor;

OK I am sure I tried that but will I just restart Apache after the global php.ini change or do I need to re-configure vhosts etc can you supply the steps.
 
IgorG

I think it is something to do with a script timeout in the fcgid.conf

Can you explain where I can edit this for a domain in Plesk 11

I have increased the memory and now get a 500 internal server error premature end of script headers

Please help
 
IgorG

OK we have made changes to the following files to get the report to run however the length of time to run is unacceptable so there must be an issue.

We VI'd the following file:

/usr/local/psa/admin/conf/templates/custom/domain/domainVirtualHost.php

We added the following FcgidIOTimeout 300 like this:

<IfModule mod_fcgid.c>
FcgidInitialEnv PP_CUSTOM_PHP_INI /var/www/vhosts/domain.com/etc/php.ini
FcgidMaxRequestLen 16777216
FcgidIOTimeout 300
</IfModule>

Then we did a:

/usr/local/psa/admin/sbin/httpdmng --reconfigure-domain <domain-name>

Then we checked that the following file was updated:

/var/www/vhost/<domain-name>/conf/last_httpd_ip_default.include

Then we had to increase memory to 512M and the report ran but took 2.5minutes which is unacceptable on a server that is a Quad Core Xeon with 16GB RAM and 15k SAS drives.

Can you make any suggestions to fix this and make the PHPExcel plugin report run in a reasonable time.
 
Back
Top