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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T15:37:42+00:00 2026-05-17T15:37:42+00:00

My LAMP application seems to eventually use up all of my server’s memory and

  • 0

My LAMP application seems to eventually use up all of my server’s memory and swap space. My gut feeling is that it has something to do with the external processes I have to call (as that is the only time the problem manifests).

I need to call GhostScript, ImageMagick’s “convert”, PDFTK, etc. constantly. When those processes are running, that’s when I see my memory running out. So, questions:

  1. Which techniques should I use to conclusively identify which process is actually causing the memory problems? My plan right now is to run the processes individually and just observe the memory usage via the *nix command “top”. Is there a way I can do this programatically?

  2. Is there any “memory flushing” solutions I can use? Would this be a good idea to do?

  • 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-17T15:37:43+00:00Added an answer on May 17, 2026 at 3:37 pm

    Another problem you might face is the fact that when forking, the application where you fork from is “doubled” so its memory consumption doubles. If you have a app server which is resident and keeps a lot of data cached this can be very significant.

    A solution to this problem is to run a small resident script/program listening on a socket or named pipe to launch the external programs.

    You can use top -b (or similar) to receive computer readable output and monitor the memory consumption there with a script.

    BTW: Do not count swap space as “real” memory, your app should run without ever hitting swap space. Once you start hitting swap space performance goes down so fast that request start piling up, causing more memory to be used, causing more stuff to be swapped. If you see significant swap space being allocated then increase memory (or buy a bigger hosting plan)

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

Sidebar

Related Questions

I am working on a web application (LAMP stack) that has the code/dependencies for
I have a LAMP (Linux/Apache/MySQL/Php) application that I should release soon. Even if I've
We are building a LAMP application that also needs to generate loads of complex
I have a few time-consuming and (potentially) memory-intensive functions in my LAMP web application.
In my LAMP application (using CodeIgniter), I have a call to $this->db->update... that generates
I think I may have a memory leak in my LAMP application (memory gets
I have a small LAMP application that I want to move to Amazon I
I'm hoping to develop a LAMP application that will centre around a small table,
I built a LAMP web application that let's users create their own profile page
I have a LAMP application that needs to accept external data sources from our

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.