Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5965191
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T19:34:05+00:00 2026-05-22T19:34:05+00:00

I hope that this is the right place to ask this question, so: We

  • 0

I hope that this is the right place to ask this question, so:

We are running a Debian (virtualized) server with Apache running php as fcgi. Today the administrator told me that the processes are consuming the RAM on the system. He asked me to look around my code.

Well I think that virtually I have no control over the php processes since Apache spawns them, so this seems more like a server configuration problem. It seems that every request spawns a new php process (this is ok). After my script terminates the php process goes to sleep.

This is what top looks like. I sorted by memory and these are the php processes (they run on the user edem):

top - 14:49:35 up 41 days,  2:09,  2 users,  load average: 0.16, 0.13, 0.06
Tasks: 228 total,   1 running, 227 sleeping,   0 stopped,   0 zombie
Cpu(s):  0.7%us,  0.3%sy,  0.0%ni, 98.7%id,  0.0%wa,  0.0%hi,  0.3%si,  0.0%st

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND                                                                                                                                           
12358 edem      20   0 67380 6464 2976 S  0.3  0.2   0:00.06 php                                                                                                                                               
12250 edem      20   0 66960 9776 6584 S  0.0  0.3   0:00.11 php                                                                                                                                               
12253 edem      20   0 67480 7812 3832 S  0.0  0.3   0:00.19 php                                                                                                                                               
12254 edem      20   0 67464 7108 3316 S  0.0  0.2   0:00.07 php                                                                                                                                               
12255 edem      20   0 67404 7340 3604 S  0.0  0.2   0:00.14 php                                                                                                                                               
12256 edem      20   0 67464 7128 3336 S  0.0  0.2   0:00.07 php                                                                                                                                               
12257 edem      20   0 67380 6484 3000 S  0.0  0.2   0:00.04 php                                                                                                                                               
12258 edem      20   0 67464 7092 3312 S  0.0  0.2   0:00.05 php                                                                                                                                               
12259 edem      20   0 67464 7184 3392 S  0.0  0.2   0:00.07 php                                                                                                                                               
12260 edem      20   0 67464 7088 3296 S  0.0  0.2   0:00.06 php                                                                                                                                               
12263 edem      20   0 66960 9780 6584 S  0.0  0.3   0:00.11 php                                                                                                                                               
12265 edem      20   0 67464 7084 3280 S  0.0  0.2   0:00.09 php                                                                                                                                               
12266 edem      20   0 67436 7376 3600 S  0.0  0.2   0:00.14 php                                                                                                                                               
12267 edem      20   0 67464 7144 3340 S  0.0  0.2   0:00.06 php                                                                                                                                               
12268 edem      20   0 67380 6508 3016 S  0.0  0.2   0:00.05 php                                                                                                                                               
12269 edem      20   0 67540 7672 3820 S  0.0  0.2   0:00.22 php                                                                                                                                               
12270 edem      20   0 67496 6488 3040 S  0.0  0.2   0:00.05 php                                                                                                                                               
12271 edem      20   0 67436 7372 3596 S  0.0  0.2   0:00.15 php                                                                                                                                               
12272 edem      20   0 67464 7108 3304 S  0.0  0.2   0:00.07 php                                                                                                                                               
12277 edem      20   0 66960 9776 6584 S  0.0  0.3   0:00.11 php                                                                                                                                               
12279 edem      20   0 67436 7368 3596 S  0.0  0.2   0:00.15 php                                                                                                                                               
12280 edem      20   0 67464 7096 3296 S  0.0  0.2   0:00.07 php                                                                                                                                               
12281 edem      20   0 67464 7748 3808 S  0.0  0.2   0:00.18 php                                                                                                                                               
12282 edem      20   0 67496 7388 3600 S  0.0  0.2   0:00.14 php                                                                                                                                               
12283 edem      20   0 67380 6464 2976 S  0.0  0.2   0:00.04 php                                                                                                                                               
12284 edem      20   0 67380 6464 2976 S  0.0  0.2   0:00.05 php                                                                                                                                               
12285 edem      20   0 67464 7168 3368 S  0.0  0.2   0:00.07 php                                                                                                                                               
12286 edem      20   0 67464 7104 3304 S  0.0  0.2   0:00.06 php                                                                                                                                               
12287 edem      20   0 66960 9780 6584 S  0.0  0.3   0:00.11 php                                                                                                                                               
12289 edem      20   0 67464 7140 3336 S  0.0  0.2   0:00.07 php   

Do you have any ide how to kill those sleeping (idling) php processes? Is there something I’m doing wrong?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T19:34:06+00:00Added an answer on May 22, 2026 at 7:34 pm

    edem, I think you shouln’t kill em. As fastcgi idea not to spawn new processes. See http://en.wikipedia.org/wiki/FastCGI#Implementation_details

    Instead of creating a new process for each request, FastCGI uses persistent processes to handle a series of requests. These processes are owned by the FastCGI server, not the web server.

    As a workaround you can try to play with your webserver fcgi settings to for example reduce “sleepin” number. Also I think your admin tells you about some peak usage, but we don’t see it here, as you top your memory in possible calm time.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I hope that this forum is the right place to ask this question! I
I hope I ask this question in a right place. Whatever we're all programmers.
I hope this is the right place to ask. Here is my scenario for
I hope I'm asking this question in the right place. I have a web
I hope I can explain this right I have two input fields that require
[I hope that this question is not too broad, I think that the subject
Not too sure how to formulate my question and I hope that this is
This is my first question on Stack Overflow, so I hope that I'm clear
this is a long question and weird problem that I hope to solve. My
I hope this question isn't too dumb. We have many websites internally that need

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.