Re: httpd slowdown issues

2008-09-03 Thread Frank Bax

Chris Tankersley wrote:

Starting on line 2198 I start getting these kinds of output:
 23747 php  CALL  fcntl(0x5,0x3,0)
 23747 php  RET   fcntl -1 errno 9 Bad file descriptor
 23747 php  CALL  fcntl(0x6,0x3,0)
 23747 php  RET   fcntl -1 errno 9 Bad file descriptor
 23747 php  CALL  fcntl(0x7,0x3,0)



http://dev.mysql.com/doc/refman/5.0/en/not-enough-file-handles.html



Re: httpd slowdown issues

2008-09-03 Thread Stuart Henderson
On 2008/09/03 19:35, Chris Tankersley wrote:
> Starting on line 2198 I start getting these kinds of output:
>  23747 php  CALL  fcntl(0x5,0x3,0)
>  23747 php  RET   fcntl -1 errno 9 Bad file descriptor
>  23747 php  CALL  fcntl(0x6,0x3,0)
>  23747 php  RET   fcntl -1 errno 9 Bad file descriptor
>  23747 php  CALL  fcntl(0x7,0x3,0)
> 
> and this continues for 245 lines. This is before the conf file is
> loaded (that happens about 1000 lines later). My script is read in on
> line 11121 and then actually wrote out on line 11305 before it exits
> with line 12414. This script took 12 seconds to run before I ran it
> through ktrace. Other than the above errors I didn't see anything
> explicitly with errors though this is the first time I've looked at a
> trace.

Display timestamps with the relevant option to kdump, and try and work
out what's happening where you see the delays.



Re: httpd slowdown issues

2008-09-03 Thread Chris Tankersley
Starting on line 2198 I start getting these kinds of output:
 23747 php  CALL  fcntl(0x5,0x3,0)
 23747 php  RET   fcntl -1 errno 9 Bad file descriptor
 23747 php  CALL  fcntl(0x6,0x3,0)
 23747 php  RET   fcntl -1 errno 9 Bad file descriptor
 23747 php  CALL  fcntl(0x7,0x3,0)

and this continues for 245 lines. This is before the conf file is
loaded (that happens about 1000 lines later). My script is read in on
line 11121 and then actually wrote out on line 11305 before it exits
with line 12414. This script took 12 seconds to run before I ran it
through ktrace. Other than the above errors I didn't see anything
explicitly with errors though this is the first time I've looked at a
trace.


On Wed, Sep 3, 2008 at 6:55 PM, Stuart Henderson <[EMAIL PROTECTED]> wrote:
> On 2008-09-03, Chris Tankersley <[EMAIL PROTECTED]> wrote:
>> Yes, even going down to something as little as > World'; ?> has a 5-10 second response time.
>
> as a starting point, I'd run that as a CLI script under ktrace
> and see if kdump output gives clues.



Re: httpd slowdown issues

2008-09-03 Thread richardtoohey
Quoting Chris Tankersley <[EMAIL PROTECTED]>:

[cut]
> >> I have a development web server set up for httpd, mysql5 and php5
> that
> >> has all of a sudden started randomly pausing. After some testing
> >> (removing PHP modules, httpd conf settings, etc) it seems that
> simply
> >> loading PHP is what is causing the issue. 
[cut]
> Yes, even going down to something as little as  World'; ?> has a 5-10 second response time.
[cut]

So ...

1. anything in the httpd error log (/var/www/logs/error_log?)

2. if you run the test script above from the command line, same problem (that
is, is it a problem with PHP, or PHP within Apache?)

3. does php -i on the command line show anything useful or the same slowdown?

4. seems strange that it was all working until recently - *anything* changed
recently on the box, however unrelated it might seem?  Any network changes
(DNS?), patches applied?  Disk space OK?  Anything unhappy in the logs?

I'm running on a similar-ish set-up and have no slow-down issues:

# pkg_info
gettext-0.16.1  GNU gettext
libiconv-1.9.2p5character set conversion library
libxml-2.6.30   XML parsing library
mysql-client-5.0.51a multithreaded SQL database (client)
mysql-server-5.0.51a multithreaded SQL database (server)
p5-DBD-mysql-4.005  MySQL drivers for the Perl DBI
p5-DBI-1.59 unified perl interface for database access
p5-Net-Daemon-0.43  extension for portable daemons
p5-PlRPC-0.2018p0   module for writing rpc servers and clients
php5-core-5.2.5p2   server-side HTML-embedded scripting language
php5-mysql-5.2.5mysql database access extensions for php5
popt-1.7p0  getopt(3)-like library with a number of enhancements
samba-3.0.28SMB and CIFS client and server for UNIX
unzip-5.52  extract, list & test files in a ZIP archive
vim-7.1.244p0-no_x11 vi clone, many additional features

# uname -a
OpenBSD blah.blah.blah 4.3 GENERIC#698 i386



Re: httpd slowdown issues

2008-09-03 Thread Stuart Henderson
On 2008-09-03, Chris Tankersley <[EMAIL PROTECTED]> wrote:
> Yes, even going down to something as little as  World'; ?> has a 5-10 second response time.

as a starting point, I'd run that as a CLI script under ktrace
and see if kdump output gives clues.



Re: httpd slowdown issues

2008-09-03 Thread Chris Tankersley
On Wed, Sep 3, 2008 at 6:08 PM,  <[EMAIL PROTECTED]> wrote:
> Quoting Chris Tankersley <[EMAIL PROTECTED]>:
>
>> I have a development web server set up for httpd, mysql5 and php5 that
>> has all of a sudden started randomly pausing. After some testing
>> (removing PHP modules, httpd conf settings, etc) it seems that simply
>> loading PHP is what is causing the issue. If I remove it from httpd
>> then serving static HTML is fine. With PHP enabled I get issues with
>> slow rendering of PHP content, slow CLI scripts (another sign it is
>> just PHP itself), and when I do a 'apachectl stop' the box will hang
>> for up to 60 seconds before responding again. I updated to the newest
>> 4.3-stable last week to see if that would help but to no avail.
>>
>> I have loaded everything from Packages and there is nothing from Ports
>> or hand compiled on the box. My 4.1-stable box has not encountered any
>> issues such as this though it is slated to be updated to 4.3 as soon
>> as some new hardware comes in.
>>
>> Any other info that is needed, just let me know.
>
> Hi, Chris.
>
> Does *any* PHP script - even just  show the problem?  I 
> think
> you are saying so above, but just to confirm.
>
> Trying to narrow it down to the smallest problem script.

Yes, even going down to something as little as  has a 5-10 second response time.
>
>>
>> [EMAIL PROTECTED] pkg_info
>> apr-1.2.11p1 Apache Portable Runtime
>> apr-util-1.2.10p0 companion library to APR
>> autoconf-2.61p1 automatically configure source code on many Un*x
>> platforms
>> curl-7.17.1 get files from FTP, Gopher, HTTP or HTTPS servers
>> db-4.6.21 Berkeley DB package, revision 4
>> femail-0.97p0 simple SMTP client
>> gettext-0.16.1 GNU gettext
>> jpeg-6bp3 IJG's JPEG compression utilities
>> libiconv-1.9.2p5 character set conversion library
>> libidn-1.1 internationalized string handling
>> libltdl-1.5.22p3 GNU libtool system independent dlopen wrapper
>> libmcrypt-2.5.7p1 interface to access block/stream encryption
>> algorithms
>> libxml-2.6.30 XML parsing library
>> mhash-0.9.1p1 strong hash library
>> mod_dav-1.0.3p5 class 1 and 2 DAV server for the Apache webserver
>> monit-4.10.1p0 monitoring and managing daemons utility
>> mysql-client-5.0.51a multithreaded SQL database (client)
>> mysql-server-5.0.51a multithreaded SQL database (server)
>> nano-2.0.7 Pico editor clone with enhancements
>> neon-0.26.2 HTTP and WebDAV client library, with C interface
>> p5-DBD-mysql-4.005 MySQL drivers for the Perl DBI
>> p5-DBI-1.59 unified perl interface for database access
>> p5-Net-Daemon-0.43 extension for portable daemons
>> p5-PlRPC-0.2018p0 module for writing rpc servers and clients
>> pear-1.5.0p1 base classes for common PHP tasks
>> pear-utils-1.5.0p0 utilities for managing pear extensions
>> pecl-APC-3.0.15 Alternative PHP Cache
>> php5-core-5.2.5p2 server-side HTML-embedded scripting language
>> php5-curl-5.2.5 curl URL library extensions for php5
>> php5-extensions-5.2.5 informational package about PHP5 extensions
>> php5-gd-5.2.5-no_x11 image manipulation extensions for php5
>> php5-mbstring-5.2.5 multibyte characters extensions for php5
>> php5-mcrypt-5.2.5 mcrypt encryption/decryption extensions for php5
>> php5-mysql-5.2.5 mysql database access extensions for php5
>> php5-mysqli-5.2.5 mysql database access extensions for php5
>> png-1.2.22 library for manipulating PNG images
>> python-2.5.2 interpreted object-oriented programming language
>> rsync-2.6.9 mirroring/synchronization over low bandwidth links
>> screen-4.0.3p1 multi-screen window manager
>> subversion-1.4.4 subversion revision control system
>> t1lib-5.1.0p1 Type 1 rasterizer library for UNIX/X11
>> vim-7.1.244p0-no_x11 vi clone, many additional features
>> wget-1.10.2p1 retrieve files from the web via HTTP, HTTPS and FTP
>>
>> Chris
>>
>
>

Chris



Re: httpd slowdown issues

2008-09-03 Thread richardtoohey
Quoting Chris Tankersley <[EMAIL PROTECTED]>:

> I have a development web server set up for httpd, mysql5 and php5 that
> has all of a sudden started randomly pausing. After some testing
> (removing PHP modules, httpd conf settings, etc) it seems that simply
> loading PHP is what is causing the issue. If I remove it from httpd
> then serving static HTML is fine. With PHP enabled I get issues with
> slow rendering of PHP content, slow CLI scripts (another sign it is
> just PHP itself), and when I do a 'apachectl stop' the box will hang
> for up to 60 seconds before responding again. I updated to the newest
> 4.3-stable last week to see if that would help but to no avail.
> 
> I have loaded everything from Packages and there is nothing from Ports
> or hand compiled on the box. My 4.1-stable box has not encountered any
> issues such as this though it is slated to be updated to 4.3 as soon
> as some new hardware comes in.
> 
> Any other info that is needed, just let me know.

Hi, Chris.

Does *any* PHP script - even just  show the problem?  I think
you are saying so above, but just to confirm.

Trying to narrow it down to the smallest problem script.

> 
> [EMAIL PROTECTED] pkg_info
> apr-1.2.11p1 Apache Portable Runtime
> apr-util-1.2.10p0 companion library to APR
> autoconf-2.61p1 automatically configure source code on many Un*x
> platforms
> curl-7.17.1 get files from FTP, Gopher, HTTP or HTTPS servers
> db-4.6.21 Berkeley DB package, revision 4
> femail-0.97p0 simple SMTP client
> gettext-0.16.1 GNU gettext
> jpeg-6bp3 IJG's JPEG compression utilities
> libiconv-1.9.2p5 character set conversion library
> libidn-1.1 internationalized string handling
> libltdl-1.5.22p3 GNU libtool system independent dlopen wrapper
> libmcrypt-2.5.7p1 interface to access block/stream encryption
> algorithms
> libxml-2.6.30 XML parsing library
> mhash-0.9.1p1 strong hash library
> mod_dav-1.0.3p5 class 1 and 2 DAV server for the Apache webserver
> monit-4.10.1p0 monitoring and managing daemons utility
> mysql-client-5.0.51a multithreaded SQL database (client)
> mysql-server-5.0.51a multithreaded SQL database (server)
> nano-2.0.7 Pico editor clone with enhancements
> neon-0.26.2 HTTP and WebDAV client library, with C interface
> p5-DBD-mysql-4.005 MySQL drivers for the Perl DBI
> p5-DBI-1.59 unified perl interface for database access
> p5-Net-Daemon-0.43 extension for portable daemons
> p5-PlRPC-0.2018p0 module for writing rpc servers and clients
> pear-1.5.0p1 base classes for common PHP tasks
> pear-utils-1.5.0p0 utilities for managing pear extensions
> pecl-APC-3.0.15 Alternative PHP Cache
> php5-core-5.2.5p2 server-side HTML-embedded scripting language
> php5-curl-5.2.5 curl URL library extensions for php5
> php5-extensions-5.2.5 informational package about PHP5 extensions
> php5-gd-5.2.5-no_x11 image manipulation extensions for php5
> php5-mbstring-5.2.5 multibyte characters extensions for php5
> php5-mcrypt-5.2.5 mcrypt encryption/decryption extensions for php5
> php5-mysql-5.2.5 mysql database access extensions for php5
> php5-mysqli-5.2.5 mysql database access extensions for php5
> png-1.2.22 library for manipulating PNG images
> python-2.5.2 interpreted object-oriented programming language
> rsync-2.6.9 mirroring/synchronization over low bandwidth links
> screen-4.0.3p1 multi-screen window manager
> subversion-1.4.4 subversion revision control system
> t1lib-5.1.0p1 Type 1 rasterizer library for UNIX/X11
> vim-7.1.244p0-no_x11 vi clone, many additional features
> wget-1.10.2p1 retrieve files from the web via HTTP, HTTPS and FTP
> 
> Chris



Re: httpd slowdown issues

2008-09-03 Thread Chris Tankersley
On Wed, Sep 3, 2008 at 1:05 PM, Ben Calvert <[EMAIL PROTECTED]> wrote:
[SNIP]
> Don't waste everyone's time with a hopelessly incomplete question. No one
> other than you has the information needed to resolve your problem, it is
> better to provide more information than needed than one detail too little.
> Any question should include at least the version of OpenBSD (i.e.,
> "3.2-stable", "3.3-current as of July 20, 2003"). Any hardware related

4.3-stable, like I had said in my original. OpenBSD 4.3-stable
(GENERIC) to be exact.

> questions should mention the platform (i.e., sparc, alpha, etc.), and
> provide a fulldmesg(8). Hardware model numbers, unfortunately, don't
> indicate much about the actual content of a particular machine or accessory,
> and are useless to anyone who doesn't have that exact machine sitting where
> they can easily recognize it. The dmesg(8) tells us exactly what is IN your
> machine, not what stickers are on the outside.

Since this was localized to a software issue I appended what installed
software was on the machine. The httpd.conf is stock except for
uncommenting mod_rewrite and an include directive to pull in conf
files for each VHost. php.ini is untouched. If a dmesg would help,
here it is:

OpenBSD 4.3-stable (GENERIC) #1: Thu Aug 28 08:33:01 EDT 2008
[EMAIL PROTECTED]:/usr/src/sys/arch/i386/compile/GENERIC
cpu0: Intel(R) Xeon(TM) CPU 3.40GHz ("GenuineIntel" 686-class) 3.40 GHz
cpu0: 
FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,SSE3,DS-CPL
real mem  = 536375296 (511MB)
avail mem = 510599168 (486MB)
mainbus0 at root
bios0 at mainbus0: AT/286+ BIOS, date 09/06/07, BIOS32 rev. 0 @
0xfd880, SMBIOS rev. 2.31 @ 0xe0010 (45 entries)
bios0: vendor Phoenix Technologies LTD version "6.00" date 09/06/2007
bios0: VMware, Inc. VMware Virtual Platform
apm0 at bios0: Power Management spec V1.2
apm0: AC on, battery charge unknown
acpi at bios0 function 0x0 not configured
pcibios0 at bios0: rev 2.1 @ 0xfd880/0x780
pcibios0: PCI IRQ Routing Table rev 1.0 @ 0xfdf30/176 (9 entries)
pcibios0: PCI Interrupt Router at 000:07:0 ("Intel 82371FB ISA" rev 0x00)
pcibios0: PCI bus #1 is the last bus
bios0: ROM list: 0xc/0x8000 0xc8000/0x1e00! 0xca000/0x1000
0xdc000/0x4000! 0xe/0x4000!
cpu0 at mainbus0
pci0 at mainbus0 bus 0: configuration mode 1 (no bios)
pchb0 at pci0 dev 0 function 0 "Intel 82443BX AGP" rev 0x01
ppb0 at pci0 dev 1 function 0 "Intel 82443BX AGP" rev 0x01
pci1 at ppb0 bus 1
piixpcib0 at pci0 dev 7 function 0 "Intel 82371AB PIIX4 ISA" rev 0x08
pciide0 at pci0 dev 7 function 1 "Intel 82371AB IDE" rev 0x01: DMA,
channel 0 configured to compatibility, channel 1 configured to
compatibility
atapiscsi0 at pciide0 channel 0 drive 0
scsibus0 at atapiscsi0: 2 targets
cd0 at scsibus0 targ 0 lun 0:  SCSI0
5/cdrom removable
cd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 2
pciide0: channel 1 ignored (disabled)
piixpm0 at pci0 dev 7 function 3 "Intel 82371AB Power" rev 0x08: SMBus disabled
vga1 at pci0 dev 15 function 0 "VMware Virtual SVGA II" rev 0x00
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
mpi0 at pci0 dev 16 function 0 "Symbios Logic 53c1030" rev 0x01: irq 9
scsibus1 at mpi0: 16 targets
sd0 at scsibus1 targ 0 lun 0:  SCSI2 0/direct fixed
sd0: 20480MB, 2610 cyl, 255 head, 63 sec, 512 bytes/sec, 41943040 sec total
mpi0: target 0 Sync at 160MHz width 16bit offset 127 QAS 1 DT 1 IU 1
vic0 at pci0 dev 17 function 0 "AMD 79c970 PCnet-PCI" rev 0x10: irq
11, address 00:0c:29:a1:82:64
isa0 at piixpcib0
isadma0 at isa0
pckbc0 at isa0 port 0x60/5
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pmsi0 at pckbc0 (aux slot)
pckbc0: using irq 12 for aux slot
wsmouse0 at pmsi0 mux 0
pcppi0 at isa0 port 0x61
midi0 at pcppi0: 
spkr0 at pcppi0
lpt0 at isa0 port 0x378/4 irq 7
npx0 at isa0 port 0xf0/16: reported by CPUID; using exception 16
pccom0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
pccom1 at isa0 port 0x2f8/8 irq 3: ns16550a, 16 byte fifo
fdc0 at isa0 port 0x3f0/6 irq 6 drq 2
fd0 at fdc0 drive 0: 1.44MB 80 cyl, 2 head, 18 sec
biomask e765 netmask ef65 ttymask ffe7
mtrr: Pentium Pro MTRR support
softraid0 at root
root on sd0a swap on sd0b dump on sd0b
syncing disks... done
rebooting...
OpenBSD 4.3-stable (GENERIC) #1: Thu Aug 28 08:33:01 EDT 2008
[EMAIL PROTECTED]:/usr/src/sys/arch/i386/compile/GENERIC
cpu0: Intel(R) Xeon(TM) CPU 3.40GHz ("GenuineIntel" 686-class) 3.40 GHz
cpu0: 
FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,SSE3,DS-CPL
real mem  = 536375296 (511MB)
avail mem = 510599168 (486MB)
mainbus0 at root
bios0 at mainbus0: AT/286+ BIOS, date 09/06/07, BIOS32 rev. 0 @
0xfd880, SMBIOS rev. 2.31 @ 0xe0010 (45 entries)
bios0: vendor Phoenix Technologies LTD version "6.00" date 09/06/2007
bios0: VMware, Inc. VMware Vir

httpd slowdown issues

2008-09-03 Thread Chris Tankersley
I have a development web server set up for httpd, mysql5 and php5 that
has all of a sudden started randomly pausing. After some testing
(removing PHP modules, httpd conf settings, etc) it seems that simply
loading PHP is what is causing the issue. If I remove it from httpd
then serving static HTML is fine. With PHP enabled I get issues with
slow rendering of PHP content, slow CLI scripts (another sign it is
just PHP itself), and when I do a 'apachectl stop' the box will hang
for up to 60 seconds before responding again. I updated to the newest
4.3-stable last week to see if that would help but to no avail.

I have loaded everything from Packages and there is nothing from Ports
or hand compiled on the box. My 4.1-stable box has not encountered any
issues such as this though it is slated to be updated to 4.3 as soon
as some new hardware comes in.

Any other info that is needed, just let me know.

[EMAIL PROTECTED] pkg_info
apr-1.2.11p1Apache Portable Runtime
apr-util-1.2.10p0   companion library to APR
autoconf-2.61p1 automatically configure source code on many Un*x platforms
curl-7.17.1 get files from FTP, Gopher, HTTP or HTTPS servers
db-4.6.21   Berkeley DB package, revision 4
femail-0.97p0   simple SMTP client
gettext-0.16.1  GNU gettext
jpeg-6bp3   IJG's JPEG compression utilities
libiconv-1.9.2p5character set conversion library
libidn-1.1  internationalized string handling
libltdl-1.5.22p3GNU libtool system independent dlopen wrapper
libmcrypt-2.5.7p1   interface to access block/stream encryption algorithms
libxml-2.6.30   XML parsing library
mhash-0.9.1p1   strong hash library
mod_dav-1.0.3p5 class 1 and 2 DAV server for the Apache webserver
monit-4.10.1p0  monitoring and managing daemons utility
mysql-client-5.0.51a multithreaded SQL database (client)
mysql-server-5.0.51a multithreaded SQL database (server)
nano-2.0.7  Pico editor clone with enhancements
neon-0.26.2 HTTP and WebDAV client library, with C interface
p5-DBD-mysql-4.005  MySQL drivers for the Perl DBI
p5-DBI-1.59 unified perl interface for database access
p5-Net-Daemon-0.43  extension for portable daemons
p5-PlRPC-0.2018p0   module for writing rpc servers and clients
pear-1.5.0p1base classes for common PHP tasks
pear-utils-1.5.0p0  utilities for managing pear extensions
pecl-APC-3.0.15 Alternative PHP Cache
php5-core-5.2.5p2   server-side HTML-embedded scripting language
php5-curl-5.2.5 curl URL library extensions for php5
php5-extensions-5.2.5 informational package about PHP5 extensions
php5-gd-5.2.5-no_x11 image manipulation extensions for php5
php5-mbstring-5.2.5 multibyte characters extensions for php5
php5-mcrypt-5.2.5   mcrypt encryption/decryption extensions for php5
php5-mysql-5.2.5mysql database access extensions for php5
php5-mysqli-5.2.5   mysql database access extensions for php5
png-1.2.22  library for manipulating PNG images
python-2.5.2interpreted object-oriented programming language
rsync-2.6.9 mirroring/synchronization over low bandwidth links
screen-4.0.3p1  multi-screen window manager
subversion-1.4.4subversion revision control system
t1lib-5.1.0p1   Type 1 rasterizer library for UNIX/X11
vim-7.1.244p0-no_x11 vi clone, many additional features
wget-1.10.2p1   retrieve files from the web via HTTP, HTTPS and FTP

Chris