Cloud House Technologies Logo
CloudHouse Technologies
HomeServicesProjectsBlogAbout UsCareersContact UsLogin
    Cloud House Technologies Logo
    CloudHouse Technologies
    HomeServicesProjectsBlogAbout UsCareersContact UsLogin

    DirectAdmin CustomBuild Stuck: PID Lockfile Error Fix (2026)

    Priya

    Content Writer & Researcher

    Last Updated: 4 July 2026
    DirectAdmin CustomBuild Stuck: PID Lockfile Error Fix (2026)
    🖥️

    CustomBuild Stuck Mid-Update on DirectAdmin?

    A stalled update can leave security patches unapplied and your web stack half-built. Let CloudHouse safely resolve it and get updates flowing again.

    🔧 Book Free DiagnosisCall NowWhatsApp
    🖥️12,400+PCs Fixed
    ⭐4.9★Google Rating
    ⚡<15 minAvg. Response
    🛡️ISO 27001Certified

    If DirectAdmin's CustomBuild refuses to run and throws a PID lockfile error, the update process didn't actually crash — it just never cleaned up after an earlier interrupted run. CustomBuild uses a lockfile to prevent two update processes from running simultaneously and corrupting each other's work, but if a previous update was killed, timed out, or the server rebooted mid-build, that lockfile gets left behind and every future update attempt refuses to start. Here's exactly how to safely clear it and get updates running again.

    Why CustomBuild Gets Stuck on a Lockfile

    Every time you run ./build, CustomBuild writes a PID lockfile to prevent overlapping builds — a real safeguard, since two simultaneous Apache or PHP rebuilds can leave your web stack in a broken, half-compiled state. The lockfile is supposed to be removed automatically when the build finishes. If the process is killed (SSH session drop, OOM killer, manual kill -9, server reboot), the lockfile survives even though the process it was protecting no longer exists.

    The next time you try to run an update, CustomBuild checks the lockfile, sees a PID reference, and refuses to start — even though that PID isn't actually running anything anymore. You'll typically see an error resembling:

    Error: build process is already running (PID XXXX)
    Or: /usr/local/directadmin/custombuild is currently locked

    💡 None of these worked? Skip the guesswork.

    Get Expert Help →

    Step-by-Step Fix: Clearing the Lock and Resuming

    1Confirm the referenced PID is not actually running
    ps aux | grep XXXX
    

    Replace XXXX with the PID number shown in the lockfile error. If nothing matches, the process is dead and it's safe to remove the stale lock.

    2Locate and remove the CustomBuild lockfile
    cd /usr/local/directadmin/custombuild
    ls -la | grep -i lock
    rm -f .custombuild.pid
    

    The exact lockfile name can vary slightly between CustomBuild versions — check the directory listing for anything matching .pid, .lock, or referencing "build" before deleting.

    3Re-run the update
    ./build update_versions
    ./build update
    

    With the stale lock removed, CustomBuild should start normally. Watch the output closely for the first few minutes to confirm it's actually progressing rather than immediately erroring again.

    4If the build script itself is missing or corrupted

    Sometimes an interrupted update leaves the build script itself partially overwritten. If you see "No such file or directory" for the build script, re-download a clean copy:

    cd /usr/local/directadmin/custombuild
    wget https://files1.directadmin.com/services/custombuild/2.0/custombuild/build
    chmod 755 build
    ./build update_versions
    
    5Check for memory exhaustion causing repeated interruptions

    If updates keep getting killed mid-build (which is what creates the stale lockfile in the first place), it's often an out-of-memory condition on smaller VPS instances rebuilding Apache or PHP from source. Reduce concurrent build processes to lower memory usage:

    cd /usr/local/directadmin/custombuild
    vi configure/ap2/httpd_mpm_conf.default_all_php.conf
    # Lower StartServers / MaxRequestWorkers values
    ./build apache
    

    Preventing Interrupted Updates in Future

    • Always run CustomBuild updates inside screen or tmux so an SSH disconnect doesn't kill the process mid-build:
      screen -S custombuild
      ./build update
      # Ctrl+A then D to detach safely
    • Check available memory before large rebuilds with free -h — Apache/PHP source builds are memory-intensive and can trigger the OOM killer on small VPS plans
    • Schedule updates during low-traffic windows so an interrupted build doesn't compound with active site traffic contention
    • Keep CustomBuild itself updated — some lockfile-handling bugs have been fixed in recent CustomBuild 2.0 releases

    How to Verify the Update Completed Successfully

    • Run ./build versions to confirm Apache, PHP, and other components show the expected updated version numbers
    • Check httpd -v or php -v directly to confirm the running binaries match what CustomBuild reports
    • Review /usr/local/directadmin/custombuild/build.log or similar logs for any error lines from the completed run
    • Restart the affected services and confirm sites are serving correctly before considering the update fully verified

    When to Call a Server Expert

    A stuck CustomBuild update on a production DirectAdmin server can block critical security patches from being applied, leaving the server exposed longer than it should be. CloudHouse's server management service handles DirectAdmin CustomBuild maintenance, stuck update recovery, and safe version upgrades so hosting companies don't have to troubleshoot build failures under pressure.

    Frequently Asked Questions

    Is it safe to delete the CustomBuild lockfile manually?

    Yes, as long as you've confirmed the PID referenced in the lockfile is not actually a running process. Deleting a lockfile that's still protecting an active build can cause two updates to run simultaneously, which can corrupt your web stack.

    Why does CustomBuild keep getting killed mid-update?

    This is most often a memory exhaustion issue — compiling Apache or PHP from source is resource-intensive, and on smaller VPS plans the OOM killer terminates the build process, leaving a stale lockfile behind each time.

    What's the difference between "build update_versions" and "build update"?

    update_versions refreshes CustomBuild's internal list of available software versions without applying changes, while update actually rebuilds and applies the selected component updates. Run update_versions first before a full update.

    Can I avoid this issue entirely by running updates in a screen session?

    Yes — running long CustomBuild operations inside screen or tmux means an SSH disconnect won't kill the process, which is one of the most common causes of the stale lockfile in the first place.

    What should I do if the build script itself is missing after an interrupted update?

    Re-download a fresh copy of the build script directly from DirectAdmin's official file server and set the correct executable permissions before re-running any update commands.

    Get the Free Linux Server Admin Cheatsheet (PDF)

    Essential commands for server management, networking, and troubleshooting — all on one printable page.

    Running Linux servers? Let us manage them for you.

    Our Managed Linux Server plans cover updates, security hardening, monitoring, and 24/7 incident response — so your servers stay up and your team stays focused.

    • Proactive OS patching and security updates
    • 24×7 monitoring with instant alerting
    • Backup configuration and disaster recovery
    • Dedicated Linux engineers on call
    See Pricing Plans →

    What our customers say

    “Our production server went down at 2 AM. CloudHouse had it back online in under 20 minutes. Incredible response time.”

    Arun S.

    CTO, SaaS Startup

    “They migrated our entire infrastructure from Ubuntu 18 to 22 with zero downtime. Couldn't have asked for better.”

    Deepak N.

    DevOps Lead

    Frequently Asked Questions

    Yes, as long as you've confirmed the PID referenced in the lockfile is not actually a running process. Deleting a lockfile that's still protecting an active build can cause two updates to run simultaneously, which can corrupt your web stack.

    Book your free 15-minute diagnosis

    A certified technician will call you back within 15 minutes during business hours.

    Share this article

    Leave a Comment

    Comments (0)

    Loading comments...

    Need Help With a Stuck DirectAdmin Update?

    Lockfile errors and interrupted CustomBuild runs can leave your server in an inconsistent state. Our team handles DirectAdmin maintenance daily and can safely recover a stuck build.

    Call Now — FreeWhatsApp Us

    Why CloudHouse?

    • ISO 27001:2022 certified
    • 12,400+ devices supported
    • 4.9★ on Google
    • Sub-15-minute response

    CloudHouse Technologies

    Innovative cloud solutions for modern businesses. We deliver cutting-edge technology with exceptional service.

    Contact Us

    CloudHouse Technologies Pvt.Ltd
    Special Economic Zone(SEZ),
    Infopark Thirissur,4B-15,
    Indeevaram,Nalukettu Road,
    Koratty, Kerala, India-680308
    0480-27327360
    info@cloudhousetechnologies.com

    Quick Links

    • Our Services
    • Gold Loan Software
    • About Us
    • Contact
    • Terms and Conditions
    • Privacy Policy
    ISO27001:2022
    Certified

    © 2026 CloudHouse Technologies Pvt.Ltd. All rights reserved.

    Back to top