Cameron Swyft
Cameron Swyft

Reputation: 458

PHP Fatal error: Out of memory (allocated 1707606016) (tried to allocate 426680697 bytes)

I have a droplet on DigitalOcean, it was a 10$ package with 1GB Memory, then I upgraded to 20$ package.

So how it all started was that I'm trying to upload a file from one server to another using cURL parameters, now the issue is... The file doesn't send because I get this beautiful error.

PHP Fatal error:  Out of memory (allocated 1707606016) (tried to allocate 426680697 bytes)

Now I have memory_limit set to 2048MB because that's how much MB of memory I got on my VPS. Now before I upgraded, I had only 1024MB of memory and the error message was different at the time, and this is what I got.

PHP Fatal error:  Out of memory (allocated 530055168) (tried to allocate 529639729 bytes) 

My VPS has MORE than enough memory to upload a 403MB file, and I have my memory_limit maxed, there's no way I need to upgrade the servers memory limit.

memory_limit = 2048M
file_uploads = On
upload_max_filesize = 5000M
max_file_uploads = 20
allow_url_fopen = On
post_max_size = 0
max_execution_time = 90000
max_input_time = 90000

Obviously it may look like a duplicate, but the solutions on all of the posts I've looked at don't work for me. The script that is having its memory_limit is literally a handler that handles the cURL request sent from the alternative server.

Upvotes: 1

Views: 44996

Answers (3)

Tadeo
Tadeo

Reputation: 336

I had the same issue in a DigitalOcean droplet of 1GB of RAM and 1CPU. Trying to install two differents LMS systems, Claroline and Chamilo. I upgraded the droplet to 2GB of RAM and same CPU.

The issue was solved. Deffintively it was something related to memmory limits.

Upvotes: 1

Pratik Kamani
Pratik Kamani

Reputation: 758

You can changed the php.ini

memory_limit = -1

and add to httpd.conf And restart Apache

Upvotes: 2

Pankaj Chauhan
Pankaj Chauhan

Reputation: 1715

You can changed the php.ini

memory_limit = 128M

and add to httpd.conf And restart and restart apache

Upvotes: -1

Related Questions