[phpa] Re: phpa on FreeBSD - segfault

  • From: "PHP Accelerator" <php_accelerator@xxxxxxxxxxx>
  • To: phpa@xxxxxxxxxxxxx
  • Date: Mon, 19 Nov 2001 18:10:40 +0000

Thanks for the info Julien.

The first thing then is that the shm cache is too small, and this will 
degrade performance. A rough guide for setting the size is to total up the 
size of the phpa_* files in MB's, add a couple more, and use that value. If 
you're not sure then just set it as 32.

If ezpublish keeps creating new files or replacing files (i.e. a new file as 
opposed to overwriting an old file), then reducing the ttl value from 12 
hours, perhaps by quite a lot, so that the shm cache flushes out stale files 
sooner would be a good idea. If it was a known set of files then you could 
instead configure phpa to not cache those files, and in 1.2, to just use the 
file cache and not the shm cache for them.

When Jamies made the port I'd be keen for you to try that, also with 4Mb for 
the size (the default is now 8 with 1.2), and see if you still get a crash.

If array functions are used much then if you can switch PHP versions I'd 
really recommend 4.0.7RC3. It's more stable and is also faster, and it makes 
sense to rule that out if possible.

Depending on time, I'm aiming to also include a simple cache manager tool in 
release 1.2 that will help giving an idea on cache usage and sizing.

Nick

>From: "julien maerten" <julien@xxxxxxxxx>
>Reply-To: phpa@xxxxxxxxxxxxx
>To: <phpa@xxxxxxxxxxxxx>
>Subject: [phpa] Re: phpa on FreeBSD - segfault
>Date: Mon, 19 Nov 2001 16:53:14 +0100
>
>
>Hi,
>
>     Here is an example of what I get at the moment, with logging enabled :
>
>phpa-c0-shm: (12427) Cache full - dropping
>/space1/ez/ezbulkmail/classes/ezbulkmailcategorysettings.php to free space
>phpa-c0-shm: (12427) Cache full - dropping
>/space1/ez/eztrade/classes/ezoption.php to free space
>phpa-c0-shm: (12427) Cache full - dropping
>/space1/ez/eztrade/classes/ezoptionvalue.php to free space
>[Mon Nov 19 16:39:45 2001] [notice] child pid 12427 exit signal 
>Segmentation
>fault (11)
>[Mon Nov 19 16:40:05 2001] [notice] child pid 12430 exit signal 
>Segmentation
>fault (11)
>[Mon Nov 19 16:40:18 2001] [notice] child pid 12418 exit signal 
>Segmentation
>fault (11)
>[Mon Nov 19 16:40:27 2001] [notice] child pid 12419 exit signal 
>Segmentation
>fault (11)
>[Mon Nov 19 16:40:34 2001] [notice] child pid 12411 exit signal 
>Segmentation
>fault (11)
>phpa-c0-shm: (12433) Cache full - dropping
>/space1/ez/ezarticle/admin/articlelist.php to free space
>[Mon Nov 19 16:40:40 2001] [notice] child pid 12433 exit signal 
>Segmentation
>fault (11)
>
>     Here is my shm config :
>
>julien@beta at 16:37 
>/home/julien/tmp/php_accelerator_1.1p1_4.0.6_freebsd4.3
> > sysctl -a | grep shm
>kern.ipc.shmmax: 33554432
>kern.ipc.shmmin: 1
>kern.ipc.shmmni: 192
>kern.ipc.shmseg: 128
>kern.ipc.shmall: 32768
>kern.ipc.shm_use_phys: 0
>
>     And my php.ini :
>
>zend_extension = /usr/local/lib/php_accelerator.so
>phpa.c0_size = 4
>phpa.cache_dir = /tmp
>phpa.c0_logging = on
>phpa.c0_stats_check_period = 5m
>phpa.c0_ttl = 12h
>
>
>
>----- Original Message -----
>From: "PHP Accelerator" <php_accelerator@xxxxxxxxxxx>
>To: <phpa@xxxxxxxxxxxxx>
>Sent: Monday, November 19, 2001 4:29 PM
>Subject: [phpa] Re: phpa on FreeBSD - segfault
>
>
> >
> > Hi,
> >
> > Julien wrote:
> > >     This segfault happens when getting pages from a site made with
> > >ezpublish, a php content manager that make a quite complex use of php.
>This
> > >problem seems to be quite minor, as the website continues to run
>correctly
> > >( but really more quickly ;-)) ).
> >
> > Before the segfault does it actually run more quickly without phpa then?
>:-)
> > If so then enable shm logging and see if the cache is flushing pages. 
>The
> > cache could be too small.
> >
> > When Jamie's produced the FreeBSD release for 1.2dev then I'll put that 
>up
> > and I'd recommend trying that.
> >
> > >     One of the particularities of ezpublish is an intensive use of
> > >references ( ie foo =& bar ), could it be related to my problem ?
> >
> > Certainly possible, but my own code uses references heavily too and it
>never
> > crashes. If you're not using 4.0.7 then I'd recommend switching to that 
>as
> > 4.0.6 has some memory bugs that could also be related.
> >
> > >     As I said, ezpublish is a quite big amount of code, so tracking 
>the
> > >bug may take some time...
> >
> > Would certainly be helpful if you can, but I'd be inclined to hold off
>until
> > Jamies had time to build 1.2dev and let me have that. One other thing 
>you
> > could do is set the (undocumented) phpa.tweaks setting to 'off' in 
>php.ini
> >
> > Cheers
> > Nick
> >
> >
> > _________________________________________________________________
> > Get your FREE download of MSN Explorer at 
>http://explorer.msn.com/intl.asp
> >
> > ------------------------------------------------------------------------
> >   www.php-accelerator.co.uk           Home of the free PHP Accelerator
> >
> > To post, send email to phpa@xxxxxxxxxxxxx
> > To unsubscribe, email phpa-request@xxxxxxxxxxxxx with subject 
>unsubscribe
> >
> >
> >
>
>------------------------------------------------------------------------
>   www.php-accelerator.co.uk           Home of the free PHP Accelerator
>
>To post, send email to phpa@xxxxxxxxxxxxx
>To unsubscribe, email phpa-request@xxxxxxxxxxxxx with subject unsubscribe
>
>


_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp

------------------------------------------------------------------------
  www.php-accelerator.co.uk           Home of the free PHP Accelerator

To post, send email to phpa@xxxxxxxxxxxxx
To unsubscribe, email phpa-request@xxxxxxxxxxxxx with subject unsubscribe


Other related posts: