Share ideas, ask questions, and get feedback about developing for ProcessMaker
Forum rules: Please post new questions under "Developing processes & programming" for ProcessMaker 2 or 3.
#778571
I am getting the PHP Fatal error: Allowed memory size of X bytes exhausted (tried to allocate X bytes). I have increased the memory_limit in the php.ini file, which wouldnt go higher than 128M. I then saw the env.ini stuff and increased to 256M with no avail. Still getting the exact same errors. I have the max_input_time in the php.ini set to 600 and the max_execution_time set to 600. I have rebooted the server and tried restarting apache each time I make any changes. It was working fine for months, then today for some reason I have started getting these errors. What should I look into next? Let me know what else to try when you get a chance.

Thank you,
James Johnston
#778574
I am not sure if these are related, but in addition to the above error I am also getting These errors:

"[19-May-2014 16:01:26] PHP Warning: Invalid argument supplied for foreach() in C:\PATH\ProcessMaker-2_5_1-1\processmaker\gulliver\system\class.form.php on line 693

[19-May-2014 16:01:28] PHP Parse error: syntax error, unexpected ';' in C:\PATH\smarty\c\%%0D^0DA^0DAC18F9%%cases_ScreenDerivation1.html.php on line 55"
#778589
I found the issue. Apparently there was a user that was added without a USR_UID in the users table. He also had some other fields blank in that table as well. Anyway this was causing an issue witht he Unassigned cases since they have a blank APP_CURRENT_USER which was filling in this user. AFter I deleted the user from the users table everything is now working correctly.
#817394
"Hey jamesjohnston,
Your first course of action is to increase your memory limit but remember increase the memory limit programmatically early on in your code, before your process runs out of memory. If you do it this way, you can give PHP extra memory only when that piece of code gets called rather than increasing the memory limit for all PHP processes.

Please set the code:
<?php
ini_set('memory_limit', '1024M'); // or you could use 1G


If by increasing the memory limit you have gotten rid of the error and your code now works, you'll need to take measures to decrease that memory usage. Here are a few things you could do to decrease it:
If you're reading files, read them line-by-line instead of reading in the complete file into memory. Look at fgets and SplFileObject::fgets.
Upgrade to a new version of PHP if you're using PHP 5.3. PHP 5.4 and 5.5 use much less memory.


"
#817395
Hey jamesjohnston,

Your first course of action is to increase your memory limit but remember increase the memory limit programmatically early on in your code, before your process runs out of memory. If you do it this way, you can give PHP extra memory only when that piece of code gets called rather than increasing the memory limit for all PHP processes.

Please set the code:
<?php
ini_set('memory_limit', '1024M'); // or you could use 1G


If by increasing the memory limit you have gotten rid of the error and your code now works, you'll need to take measures to decrease that memory usage. Here are a few things you could do to decrease it:
If you're reading files, read them line-by-line instead of reading in the complete file into memory. Look at fgets and SplFileObject::fgets.

Upgrade to a new version of PHP if you're using PHP 5.3. PHP 5.4 and 5.5 use much less memory.

A 1xbet clone script is a pre-designed software so[…]

4rabet clone script is enabling entrepreneurs to e[…]

Parimatch clone script is enabling entrepreneurs t[…]

In the world of cryptocurrency, a wallet is an app[…]