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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T03:21:23+00:00 2026-06-17T03:21:23+00:00

I have a script that runs from a cron job every night. Recently, it

  • 0

I have a script that runs from a cron job every night. Recently, it has started totally freezing up after several minutes into the script, and I can’t figure out why. If this was Java, I could simply run kill -3 PID and it would print a thread dump in stdout. Is there any equivalent in PHP, where I could get a dump of the current stack trace (and ideally memory info) on a running PHP script?

  • 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-06-17T03:21:24+00:00Added an answer on June 17, 2026 at 3:21 am

    The best thing you can do is compile PHP yourself using --enable-debug during configure. If the process then still hangs you can use gdb and some macros to get a PHP-level stacktrace using these steps:

    $ gdb -p $PHP_PID
    (gdb) bt     # Get a system-level stacktrace, might already give some info
    (gdb) source /path/to/php-src/.gdbinit # Load some useful macros
    (gdb) dump_bt executor_globals.current_execute_data
                # Macro from PHP's .gbinit giving PHP stack trace
                # If you for whatever reason are using a thread-safe PHP build you have to do this:
    (gdb) ____executor_globals
    (gdb) dump_bt $eg.current_execute_data
    

    And then debug ahead 🙂

    Note that for this to work you have to have a PHP binary with symbol information, --enable-debug ensures that.

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

Sidebar

Related Questions

I have a python script that runs on a cron job. The script uses
I have this bash script on the server that runs every hour, via cron.
I have a script that runs every two minutes for a Tweet-getter application. In
I have a script that runs every minute at XX:00. The script loops over
I currently have a python script that runs every few minutes and picks up
I have a script that runs from a domain server and 'does work' on
I have a CakePHP script that should hopefully be run by a cron job.
I have a script that runs CPAN::Mini::Inject actions and has an App::Cache. It works
I have a content script that runs from my chrome extension. this script injects
I have a scheduled task that runs a script on a regular basis (every

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.