Page 2 of 2
Re: Report limitations
Posted: Thu Apr 08, 2021 6:45 pm
by icoso
Any idea what those commands do and/or how I would use them in my nuBuilder PHP code for this report?
set_time_limit(0);
ini_set('pcre.backtrack_limit', '10000000');
ini_set('memory_limit', '4060M');
Re: Report limitations
Posted: Thu Apr 08, 2021 6:58 pm
by icoso
Kev1n,
I don't think it was a memory limit issue but rather a time limit issue. It seems as if the default time limit on my web server was 30 seconds. I changed the time_limit in my PHP Procedure to the following and now its working. I added this to my PHP code block:
set_time_limit (60);
From what I've read that default time is effectively cut in half in realtime, so changing it to 60 seconds gives my report about 30 seconds or so to actually run and complete. I ran a report on the whole month and got 38 pages of report with 1300+ records.
UPDATE: It was a memory limit issue on my server. My VPS has 6gb of available memory but the PHP memory limit was set at 32mb. We changed that to 6mb and I was able to get a lager report but only for one office. I tried two offices on my report and got an odd error. I bumped it to 128mb and that seemed to fix the issue.
Re: Report limitations
Posted: Thu Apr 08, 2021 7:25 pm
by kev1n
The default time limit is generally 30 seconds and defined by the 'max_execution_time' option of php.ini
https://www.binarytides.com/php-set-time-limit/
Re: Report limitations
Posted: Thu Apr 08, 2021 7:32 pm
by icoso
Thanks for the suggestions. I had my server support take a look at it too and they found that my PHP handler was using CGI instead of DSO (don't know what that means) and they said that switching to using DSO handler for my PHP 7.3 would be much more efficient. SO we did. I also added the following to my PHP code just in case:
set_time_limit(60);
ini_set('memory_limit', '128M');
And now Im able to run a full months report on both offices, 80+ pages and over 2600 records in about 20 seconds. Working good now.
Re: Report limitations
Posted: Thu Apr 08, 2021 7:39 pm
by kev1n
icoso wrote:don't know what that means).
If you or anyone else is interested in knowing more about this topic:
DSO vs. CGI vs. suPHP vs. FastCGI