[PHP] php-fpm (5.4.13) takes up all cpu resources

2013-04-01 Thread Free Proxy
Hi All,

I have a strange problem with php-fpm, I checkd lots of document, but I
can't fix it.
I'm using a Freebsd 91 server to host my website. Nginx and php-fpm 5.4.13
and mysql are using.
The hardware of my server is
12Core CPUs,
32G memory
6 HDD used as a Raidz2 array to host website
2 SSD used as a mirror array to host Database

After I upgrade from 5.4.11 o 5.4.13, I got below problem.

Usually, my system is in below status:(top)

last pid: 52977;  load averages:  4.70,  4.66,
5.55
301 processes: 2 running, 299 sleeping
CPU:  6.5% user,  0.0% nice,  6.3% system,  0.9% interrupt, 86.3% idle
Mem: 7029M Active, 11G Inact, 12G Wired, 1076M Cache, 399M Free
ARC: 8412M Total, 3190M MFU, 1763M MRU, 624K Anon, 209M Header, 3249M Other
Swap: 36G Total, 145M Used, 36G Free
  PID USERNAMETHR PRI NICE   SIZERES STATE   C   TIME   WCPU COMMAND
52728 www   1  250   150M 35564K accept 13   0:01  5.86% php-fpm
52735 www   1  250   150M 35416K accept 16   0:01  5.76% php-fpm
52740 www   1  250   150M 37668K accept 14   0:01  5.66% php-fpm
52739 www   1  240   150M 36424K accept 12   0:01  5.66% php-fpm
52708 www   1  240   150M 36324K accept 10   0:01  5.66% php-fpm
52724 www   1  240   150M 37740K select 16   0:01  5.57% php-fpm
52714 www   1  250   150M 36952K accept 21   0:01  5.57% php-fpm
52719 www   1  250   150M 37252K accept 23   0:01  5.57% php-fpm
52717 www   1  250   150M 39004K accept 12   0:01  5.57% php-fpm
52734 www   1  250   150M 37720K accept 18   0:01  5.57% php-fpm
52726 www   1  240   150M 37308K accept 23   0:01  5.47% php-fpm
52737 www   1  250   150M 37832K accept 14   0:01  5.37% php-fpm
52721 www   1  250   150M 36548K accept 22   0:01  5.37% php-fpm
52710 www   1  250   154M 38792K accept 16   0:01  5.37% php-fpm
52723 www   1  250   150M 35768K accept 10   0:01  5.37% php-fpm

But sometimes, I found a php-fpm will take up about 25%+ cpu resource, then
the cpu usage of php-fpm will get increased one by one. Then php-fpm will
take up all CPU resources.
Like below:

last pid: 54212;  load averages:  75.83,  75.55,
75.73
up 3+10:47:39  10:27:53
301 processes: 6 running, 295 sleeping
CPU:  6.8% user,  0.0% nice,  95.2% system,  0.7% interrupt, 0.0% idle
Mem: 7021M Active, 11G Inact, 12G Wired, 1358M Cache, 561M Free
ARC: 8525M Total, 3438M MFU, 1619M MRU, 1866K Anon, 213M Header, 3253M Other
Swap: 36G Total, 145M Used, 36G Free
  PID USERNAMETHR PRI NICE   SIZERES STATE   C   TIME   WCPU COMMAND
53939 www   1  310   150M 33096K accept 22   0:01  28.59%
php-fpm
53941 www   1  310   154M 38144K accept 20   0:01  28.40%
php-fpm
53938 www   1  300   150M 32816K accept  3   0:01  27.57%
php-fpm
53677 www   1  520   150M 28440K accept  2   0:04  26.49%
php-fpm
53948 www   1  270   150M 28964K accept 19   0:01  24.69%
php-fpm
53947 www   1  260   150M 29272K accept  8   0:01  24.05%
php-fpm
53951 www   1  250   150M 31208K accept 17   0:01  23.86%
php-fpm
53953 www   1  240   150M 35300K accept 15   0:00  23.86%
php-fpm
53950 www   1  250   150M 28268K accept  2   0:00  23.76%
php-fpm
53954 www   1  240   150M 35476K accept 19   0:00  23.76%
php-fpm
53955 www   1  240   150M 31292K accept 21   0:00  23.76%
php-fpm
53956 www   1  240   150M 34064K accept 19   0:00  23.66%
php-fpm
53962 www   1  240   150M 33224K CPU99   0:00  23.66%
php-fpm
53960 www   1  240   150M 33548K CPU17  17   0:00  23.66%
php-fpm


Below is the php-fpm.slow.

[01-Apr-2013 16:46:52] WARNING: [pool www] child 96623, script
'/web/www/forum.php' (request: GET /forum.php) executing too slow
(30.661218 sec), logging
[01-Apr-2013 16:46:52] WARNING: [pool www] child 96620, script
'/web/www/forum.php' (request: GET /forum.php) executing too slow
(31.778921 sec), logging
[01-Apr-2013 16:46:52] NOTICE: child 96764 stopped for tracing
[01-Apr-2013 16:46:52] NOTICE: about to trace 96764
[01-Apr-2013 16:46:52] NOTICE: finished trace of 96764
[01-Apr-2013 16:46:52] NOTICE: child 96763 stopped for tracing
[01-Apr-2013 16:46:52] NOTICE: about to trace 96763
[01-Apr-2013 16:46:52] ERROR: failed to ptrace(PT_IO) pid 96763: Bad
address (14)
[01-Apr-2013 16:46:52] NOTICE: finished trace of 96763
[01-Apr-2013 16:46:52] NOTICE: child 96762 stopped for tracing
[01-Apr-2013 16:46:52] NOTICE: about to trace 96762
[01-Apr-2013 16:46:52] NOTICE: finished trace of 96762
[01-Apr-2013 16:46:52] NOTICE: child 96761 stopped for tracing
[01-Apr-2013 16:46:52] NOTICE: about to trace 96761

The only way to fix this issue is to restart php-fpm.


At first, I though it's a mysql error, but I monitorred mysql process, and
I found that there is no slowlog. I tried to reinstall php, but this issue
still 

[PHP] gd library

2002-11-17 Thread A3-Mail Proxy Handler
Hi,
I am trying to add gd support to my php configuration. But I could not
manage...

Here is the versions:
php 4.2.3, gd 2.0.7, slackware 8.1, apache 1.3.27

in the make of php, php gives error with gd librarys...
(sorry, I cannot give errors now, I cannot simulate the situation for now)

Is this a known issue?
Does this happens to everyone?
Should I add something different during configure?
(I used only --with-gd)

Thanks...


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] java integration

2002-10-27 Thread A3-Mail Proxy Handler
Hi,

I have an ssl class which does not work when called within php but works from console. 
I reported this as a bug to php.net. (Algorithm [Sun bla bla] not found)

But while the bug is examined, I have to use this class from my website.

1. Do someone knows how can I integrate my site with java?
2. Is jsp like php?
3. What extras should I install to use jsp from linux/apache?
4. Does jsp works with php on the same server?
5. If so, can I exchange variables between jsp and php?

Thanx...


[PHP] php, java and ssl

2002-10-14 Thread A3-Mail Proxy Handler

Hi,
I have a java class which uses ssl to perform some banking operations. As I have been 
instructed, I downloaded certificates, classes (both jar files and class files) and 
installed them.

While testing from console, class established ssl connection to remote host and 
completed transaction.

While usign within php after making required configuration I get the following error:
java.net.SocketException: Default SSL context init failed: Algorithm SunX509 not 
available 

Please note that, all other java functions are working.  Only this function fails.
The same code, the same class works from console without any errors. Only php raises 
this error, and only for ssl.

Here is my system:

Linux Redhat 7.1 with kernel 2.4.2
apache 1.3.26
php 4.2.3
java 1.4.0 (02) sdk
openssl 0.9.6g

Thanx...



[PHP] Questions on uploading files.

2002-06-20 Thread By Proxy

Hi, sorry if this is one of those oft-answered questions, but...

I am using the script below to upload a file to the server, however if I
upload a file, say, 'pamnude.jpg' then the tmp path, file name and file size
are returned but not the mimetype. Why could this be?

Also, I read about there being a bug where arbitrary files could be
specified as the file parameter and cause files on the server to be
processed. This can be checked with the is_uploaded_file($file) function.
The example on the php.net site was /etc/passwd
Using the script below, I used /etc/passwd as the file name (or even if I
entered no file name, or any garbage text) and I always get the 'True'
response.
What am I doing wrong?

Finally, is there any way of uploading that won't cause the file to be saved
to the server, but be handled directly by a script to a database?

Thanks

Lee

?php
 if(!$ulfile_size)
 {
 $source=$HTTP_POST_FILES['ulfile']['tmp_name'];
 $name=$HTTP_POST_FILES['ulfile']['name'];
 $mimetype=$HTTP_POST_FILES['ulfile']['type'];
 $size=$HTTP_POST_FILES['ulfile']['size'];
 echo $sourcebr$namebr$mimetypebr$size;
 }

 if(is_uploaded_file($ulfile))
 {
echoTrue;
 }
 else
 {
echoFalse;
 }

echo
html
head
/head
body
form enctype='multipart/form-data' method='post' action='$PHP_SELF'
br
File to upload: input type='file' name='ulfile' id='ulfile'
br
input type=submit name='Upload' value='Upload File'br
/form
/body
/html
;
?


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP]Checking for expired sessions

2001-12-06 Thread By Proxy

Hi

Is there any way to get a list of all active sessions in apache using PHP?

Thanks

Lee


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] RE: [PHP-DEV] Question about PDF lib.

2001-08-27 Thread By Proxy

Try http://groups.yahoo.com/pdflib/

- Original Message -
From: Criegern, Phillipp von (PDV) [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Monday, August 27, 2001 6:12 PM
Subject: [PHP] RE: [PHP-DEV] Question about PDF lib.


 I would suggest looking for a real *Support Forum* or
http://www.pdflib.com/

 Do anyone know, how i define the width, height etc. parameters in
 PDFlib
 functions in PHP? Is it in cm, pixels, inch? Or?

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Re: HTTPS w/ header() ?

2001-08-20 Thread By Proxy

I have done something like this.
For the site I am working on, the user must log on. At the logon screen I
check

if(getenv(HTTPS)!=on)
{
header (Location: https://logon_screen;);
}

every page has an include that checks $HTTPS as part of the sessions and
validation. If https!=on then it kicks you back to the logon screen.

you could do the same using

if(getenv(HTTPS)!=on)
{
header (Location: https://$SERVER_NAME/$PHP_SELF;);
}

I think

Don't know if that's what you're after, but it's what I've done and I have a
high index of suspicion that it is working...

Lee


- Original Message -
From: Richard Lynch [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, August 19, 2001 12:50 PM
Subject: [PHP] Re: HTTPS w/ header() ?


  Is there is a way with PHP (most probably headers) to go HTTPS mode?
  I don't want to specify https://www.myserver.com/secured_page.php
  I just want it normal but in it's header to tell the browser to initiate
 an
  HTTPS mode.

 I don't think you can do that...

 You could send a header to do:

 header(Location: https://www.myserver.com/secured_page.php;);

 but pretty much the user will then see the https when the page shows up...

 What's the big picture here?  I've got a feeling you've gone down a wrong
 path that's making you ask this question...

 --
 WARNING [EMAIL PROTECTED] address is an endangered species -- Use
 [EMAIL PROTECTED]
 Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
 Volunteer a little time: http://chatmusic.com/volunteer.htm




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Test

2001-08-08 Thread By Proxy

Testing..
Check, check, 1 2..2..


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Strange session problems. Please help.

2001-08-08 Thread By Proxy

Hi.

Does anybody know of any issues in PHP 4.0B2 regarding to the handling of
session variables on different networks?

Here is the problem. I have written a user authentication system using
session variables. When the user logs in their name and pass are stored as
an associative array (with other details from a database). If the details
are invalid the user is booted back to the logon screen. The system worked
fine for everyone except myself and one other person who was on the same
network (optus@home network).

The problem was that although the username and password were sent and stored
into the session variables, upon accessing another page the session
variables were not carried forward (although the session id was) and so I
was thrown back to the login. As I said, this was only true for users on the
optus@home network. Fpr anyone else it seemed to be fine.

Identical code on a server running PGP 4.0.4pl1 worked universally.
I have been tearing my remaining hair out for days on this one now. Does
anyone have any suggestions (except for 'Upgrade PHP on the 4.0B2 server' or
'move to a different server'. That, unfortunately is beyond my control :(  )

Cheers

Lee


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Test: Ignore

2001-07-23 Thread By Proxy

Test: Ignore, just like the subject says.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] PDFlib beginners request

2001-07-23 Thread By Proxy

Hi. I  have just started to play with PDFlib, but the manual and php.net
notes are not, to my simple self, particularly digestible. Does anyone have
any links to any tutorial pages or any handy hints they could point me to?

Cheers

Lee


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]