Re: Fatal memory allocation error at cleanup on production server only

2010-03-14 Thread Mark Hindley
OK, I have tracked down a minimal test case and it seems to be nothing to
do with CakePHP. So sorry for the noise.

Just FYI, the following minimal php script produces the Fatal error,
even outside CakePHP, so it seems to be something in the php
installation.



Thanks for your help

Mark

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Fatal memory allocation error at cleanup on production server only

2010-03-13 Thread Mark Hindley
On Sat, Mar 13, 2010 at 12:56:56PM +, Jon Bennett wrote:
> > Possibly -- but that is part of the problem. I identical cakephp and app
> > running of 2 dev systems and it runs flawlessly with no equivalent
> > error.  It only seems to be happening on this particular system,
> > unfortunately that is the production server!
> 
> Could it be traffic specific? Do your dev boxes have cpanel on them or
> are they identical?

Possibly. The dev boxes are just various versions of Debian. I think trying to
reproduce the exact versions of everything on the cpanel box will be
tricky. And if it is a configuration issue, it still may not trigger the
error.

Mark

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Fatal memory allocation error at cleanup on production server only

2010-03-13 Thread Mark Hindley
On Sat, Mar 13, 2010 at 12:30:39PM +, Jon Bennett wrote:
> >> can you install xdebug? http://xdebug.org/
> >
> > The production server is on cpanel so I don't think I can directly. I
> > have just asked the hosting provider to consider it.
> 
> Is it feasible to purchase another box without cpanel but the same
> spec that you can put xdebug on, perhaps routing some traffic to one
> and some to the other to test?

Possibly -- but that is part of the problem. I identical cakephp and app
running of 2 dev systems and it runs flawlessly with no equivalent
error.  It only seems to be happening on this particular system,
unfortunately that is the production server!

Mark

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Fatal memory allocation error at cleanup on production server only

2010-03-13 Thread Mark Hindley
On Sat, Mar 13, 2010 at 11:53:58AM +, Jon Bennett wrote:
> can you install xdebug? http://xdebug.org/

The production server is on cpanel so I don't think I can directly. I
have just asked the hosting provider to consider it.

Cheers,

Mark

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Fatal memory allocation error at cleanup on production server only

2010-03-13 Thread Mark Hindley
On Fri, Mar 12, 2010 at 09:24:06PM -0800, Dr. Loboto wrote:
> Did you place echos in each deatructor both on enter and exit?

Yes. The one in socket.php didn't seem to be being called, but the
others all seemed to run and exited before the Fatal error appears. 

Are the destructors the very last thing that CakePHP runs? Does that
imply that the error comes from somewhere else in the php installation?
Other php scripts on the server run without causing the error, so it
appears to be something that CakePHP is doing. If I am to persuade the
hosting admin that is is something in the php installation, I will need
to be able to produce a short test case that reproduces it.

Mark

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Fatal memory allocation error at cleanup on production server only

2010-03-12 Thread Mark Hindley
On Fri, Mar 12, 2010 at 08:24:33AM -0800, Dr. Loboto wrote:
> If error occurs on shutdown it definitely caused by some destructor.
> I've looked into all defined by cake core destructors and found some
> possible dangerous in some cases. All of them write caches and use
> array_filter($objects_to_save) that may give memory allocation error
> if $objects_to_save is a large array and memory is not enough.
> Configure writes objects map, App writes dirs map and files map and
> I18n writes domains map.
> 
> Also ConnectionManager closes session. Own session handler code may
> also have dangerous operations. DataSource closes connecton, custom
> datasource may have dangerous code.

I have been through all of the destructors and put a debugging echo in
each one. The Fatal error seems to come after they have all run. Does
that mean it is coming from outside CakePHP? Other php scripts on the
server run with no error. 

Mark

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Fatal memory allocation error at cleanup on production server only

2010-03-12 Thread Mark Hindley
On Thu, Mar 11, 2010 at 09:01:26AM -0800, Dr. Loboto wrote:
> If your production runs with debug = 2 it may be big SQL log and new
> allocation to show it. But I'm not sure.

Thanks. The production was running with debug = 0. When it is set to 2,
the Fatal Error appears after the SQL log is output, so it doesn't
appear to be that. 

Any other suggestions of how to get a handle on this?

My understanding is you can't trap Fatal Errors like this to get a
backtrace. The error message doesn't give a location. I don't even know
where to start looking!

Cheers,

Mark

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en