Fatal Error Allowed Memory Size of 134217728 Bytes Exhausted CodeIgniter XML-RPC

0 votes

My client point of sale (POS) systems send updated sales data to a central database on a regular basis, where it is collected and stored in order to generate reports.

The client POS is built on PHPPOS, and I've developed a module that sends sales information to the service using the common XML-RPC library. The webservice component of the server system is constructed using CodeIgniter and employs the XML-RPC and XML-RPCS libraries. I see the following issue whenever I send a large amount of sales data (as few as 50 rows from the sales database and individual rows from sales items referring to each item inside the sale):

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 54 bytes)

The default setting in php.ini is 128M, but I imagine that's a big quantity to mess up. In fact, I tried increasing this amount to 1024M, but all that happened was that it took longer for the error to occur.

In terms of actions I've done, I've tried turning off all server-side processing and configured it to always provide a pre-written response. However, I think the issue is with how the data is really sent. Even after I disabled PHP's maximum script execution time, there were still issues.

Aug 1, 2022 in PHP by Kithuzzz
• 38,000 points
1,508 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes
It is not a good idea to change the memory limit using ini set('memory limit', '-1'). Don't do that, please. You might be instructing the server to utilize all the memory it wants while your PHP code has a memory leak someplace. You wouldn't have done anything to solve the issue. If you keep an eye on your server, you'll notice that it's probably consuming up the majority of the RAM right now and even switching to disc.

Attempting to locate and correct the problematic code in your program is generally a good idea.
answered Aug 2, 2022 by narikkadan
• 63,600 points

edited Mar 5
0 votes
ini_set('memory_limit',-1);
answered Aug 29, 2022 by anonymous

edited Mar 5

Related Questions In PHP

0 votes
1 answer

Error:uncaught exception: out of memory in Ajax Process

Hello @kartik, From your description of being redirected ...READ MORE

answered Jun 16, 2020 in PHP by Niroj
• 82,840 points
2,141 views
0 votes
1 answer

Error:PHP Warning: POST Content-Length of 8978294 bytes exceeds the limit of 8388608 bytes in Unknown on line 0

Hello @kartik, 8388608 bytes is 8M, the default ...READ MORE

answered Sep 17, 2020 in PHP by Niroj
• 82,840 points
29,075 views
0 votes
1 answer
0 votes
0 answers

Fatal error: Maximum execution time of 30 seconds exceeded

I am getting this error when I ...READ MORE

May 16, 2022 in PHP by Kichu
• 19,040 points
819 views
0 votes
0 answers

Fatal error : execution time of 30 seconds exceeded in phpMyAdmin

My MySQL table has 6.5 million records ...READ MORE

Jul 26, 2022 in PHP by Kithuzzz
• 38,000 points
1,875 views
0 votes
1 answer

Fatal error: Class 'PHPUnit_Framework_TestCase' not found in .?

Hello @kartik, You may get this error because ...READ MORE

answered May 19, 2020 in PHP by Niroj
• 82,840 points
2,391 views
0 votes
1 answer
0 votes
1 answer

CodeIgniter removing index.php from url

To solve your doubt, use the following ...READ MORE

answered Feb 23, 2022 in PHP by Aditya
• 7,680 points
1,370 views
0 votes
0 answers
0 votes
0 answers

php error: The Encrypt library requires the Mcrypt extension in codeigniter

I have a  login and sign-up form and ...READ MORE

Jun 20, 2022 in PHP by Kithuzzz
• 38,000 points
3,928 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP