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 3425782
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T06:38:06+00:00 2026-05-18T06:38:06+00:00

I keep running into stale, locked, (php) session files on my apache server which

  • 0

I keep running into stale, locked, (php) session files on my apache server which keep the threads from closing and thus eating away my server resources.

Its an Ubuntu box and having session_write_close(); in the automatically appended script doenst help. I keep ending up with locked session files which are local (memory disk) and with no other processes trying to access it…

I just dont know where to look anymore…


To clearify things a bit:

  • we’re running ubuntu stock apache2 (MPM prefork i believe) with standard PHP session handling
  • the sessions are stored on a ramdrive so fsck-ing the thing wont do much 😉

The problem arises inconsistently and on different time intervals. But after looking at the open files (via lsof | grep sess_) i keep seeing apache2 threads holding on to those files.

apache2   28405 www-data   30uW     REG               0,18     38652    2737432 /data/ramdrive/sess_8f95700e5d2ed8daf2e2d12625ed7d53

Since i dont have the issue ATM i have no actual live data, but it looked something like this:
doing an strace -p on the aforementioned id
i would see something in the line of

F_LOCK(30, 

something…
doing an ls -l /proc/[apache pid]/fd/30
(BTW everytime its always 30!) it would point to some session file

The actual file contained no weird stuff and looked pretty sane…

Does the fact that when it happened all FD’s pointed to 30 (so it would end up being /proc/123123/fd/30 and /proc/123124/fd/30 etc) does that have to do with anything?

  • 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-18T06:38:07+00:00Added an answer on May 18, 2026 at 6:38 am

    Not really a solution, but i’ve now bypassed the problem by having a cron script reboot apache every 4 hours… this way atleast the problem wont have as much impact…

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

Sidebar

Related Questions

I am retrieving a file from our FTP server which is then put into
I keep running into an error from the following statement: cursor.execute(INSERT into financial_statements (url)
Keep running into When using the multi-mapping APIs ensure you set the splitOn param
I keep running into the following problem: (System.Console.ReadLine ()).Split [|'('; ')'|] |> Array.filter (fun
I keep running into the same testing Failure, and I can't figure out quite
I keep running into this design problem, and I'm not happy with my solution
I keep running into enq: TX - row lock contention, when I run the
I keep running into this error MemCacheError (Broken pipe): Broken pipe on my Rails
I've been using RhinoMocks lately but I keep running into an issue. If I
I am sure this is relatively simple, I just keep running into brick walls.

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.