This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use Stack Overflow.

Memory limit

Discussion around this tutorial for symfony 1.0.x

Memory limit

by ropic » Wed Mar 01, 2006 6:27 am

Hello,

I'm using a batch file to insert in my database A LOT of records that i have in XML format, i have created my model and i'm using the "setters" methods and finally save inside a foreach, i'm unseting my object on every cycle but using memory_get_usage() i saw that the memory increases every time i set and save a record, an then i get

"Allowed memory size of XXXXX bytes exhausted"

I don't want no increase more my memory limit

What's the problem ???
ropic
Junior Member
 
Posts: 20
Joined: Sun Feb 19, 2006 9:03 am

Re: Memory limit

by FractalizeR » Sat Mar 28, 2009 8:21 pm

Please post here your code sample.
FractalizeR
Member
 
Posts: 60
Joined: Sun Mar 15, 2009 4:49 pm
Location: Russia, Moscow

Re: Memory limit

by skywalker » Mon Mar 30, 2009 8:08 am

Disable the memory limit for your batch script:

Code: Select all
#!/usr/local/bin/php -d memory_limit=-1
<?php
... your php code here
May the source be with you
User avatar
skywalker
Faithful Member
 
Posts: 337
Joined: Fri Mar 07, 2008 4:31 pm
Location: Norway