Memory Allocation Error

6 posts by 2 authors in: Forums > CMS Builder
Last Post: April 23, 2012   (RSS)

By nmsinc - April 21, 2012

I have a record inventory script that looks at all records and does a simple math calc for totaling number of records over a given period in time. Worked well until the total number of records reached 180 (low amount) and stalled due to memory issues. The server limits were set to 32M and I changed to 64M, did a routine repair of database and all is working again. My concern is that once my record count reaches beyond 360 will this happen again?

Thanks - nmsinc
nmsinc

Re: [nmsinc] Memory Allocation Error

By Dave - April 21, 2012

Hi nmsinc,

How are you calculating the total? If it's in PHP then what's happening is all the records are being loaded into memory. If so then the better way to do it would be in MySQL so all the work is done on the mysql server.

If you can attach your viewer with the code in it I'll take a look and try to help. Thanks!
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Memory Allocation Error

By nmsinc - April 21, 2012

Attached !

Thanks - nmsinc
nmsinc

Re: [nmsinc] Memory Allocation Error

By Dave - April 21, 2012

Oops, looks like it didn't come through. Can you attach again?
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Memory Allocation Error

By nmsinc - April 23, 2012

Sorry about that - let's try again!
nmsinc
Attachments:

inventory.php 15K