• Skip to main content
  • Skip to primary sidebar
  • Skip to footer
Michele Neylon :: Pensieri

Michele Neylon :: Pensieri

Technology, Marketing, Domains, Thoughts

Debugging a Broken Website

June 8, 2020 by Michele Neylon Leave a Comment

Technology binary code number data alert System Error message on display screen / Computer network problem error software concept - selective focus

The joys of running websites is that you often end up troubleshooting issues that crop up. Sometimes the error can be something really simple, or fairly obvious. Like you switch to the latest version of PHP but forget to install all the required PHP modules. Other times, however, the error is more niggly than anything else, so you put it on the long finger.

In my case I’d been having ongoing issues with one of my personal blogs. It kept throwing errors, but then would behave long enough that I’d assume I’d fixed the issue. You’d get a rather “helpful” HTTP 500 error, but there was nothing in the logs that I could see. I tried tweaking the various plugins that I had installed and disabled a few to see if that would fix the errors, but it didn’t make any difference.

The apparent lack of any detailed logs of the error was really annoying, and plain weird. But I didn’t have time to explore the problem properly, until things came to a head over the weekend.

So it turns out there were logs, but I had been looking in the completely wrong place!

The PHP errors were being logged into a completely separate log file called (helpfully):

$sitename.php.error.log

Which instead of being in the same location as the main logs for the site, or even for the server, were in:

/home/$user/logs

So once I started tracking that log file I quickly realised that the issue was memory related.

Now this is where it got a little odd.

The server’s PHP memory limits were set at a “sane” value and none of the other sites on there were having any memory issues.

So why on earth was this one site hitting problems?

To add to the head scratching the error was about a relatively low amount of memory causing the issue.

So what was going on?

One of the features in cPanel is that at the user level you can tweak your PHP settings. Probably very useful in some circumstances, but since I have full root access on the entire server it’s not something I’d normally mess around with.

But, for some odd reason, there was a PHP.ini override in the user’s home directory. And it had a stupidly low memory limit.

Some more poking around led to me discovering that the setting had been made when the site was running php 7.3 (no idea by whom of course!).

Anyway fixing the memory limit in cPanel made the problem go away – at least for now!

Thanks to one of my team who were able to help me fix this – I was really getting ready to give up!

Related Posts:

  • Fun 404 Error Page Oregon Museum of Science & Industry
    Fun 404 Error Page Oregon Museum of Science & Industry
  • A New Look Caricature
    A New Look Caricature
  • Yahoo! Groups Shutting Down Finally
    Yahoo! Groups Shutting Down Finally
  • Revisiting an old Hobby
    Revisiting an old Hobby
  • Salad, Flowers, Herbs and LED Lights
    Salad, Flowers, Herbs and LED Lights
  • Keeping the Greenhouse Under Control is an Uphill Struggle!
    Keeping the Greenhouse Under Control is an Uphill Struggle!

Filed Under: Random Tagged With: logs, php

Michele is founder and CEO of Irish hosting provider and domain name registrar Blacknight. Read More…

Reader Interactions

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Primary Sidebar

Newsletter Signup

Join my newsletter

Please wait...

Thank you for signing up!

dotblog founder

Most Recent Posts

American English vs English

Aslan in the 1980s

Hans Zimmer on 60 Minutes

Paint it Black on Violin

If my Music Taste was a Festival …


Mastodon

Archives

  • Instagram
  • Twitter

Pages

  • About Me
  • About This Site
  • Archives
  • Comments Policy
  • Contact Me
  • Newsletter
  • Privacy

Blogroll

  • Paul Savage – BlackDog SEO
  • Tom Doyle
  • Gordon Hudson
  • Technology.ie Podcast
  • Blacknight Blog

Footer

Site hosted in Ireland by Blacknight - Content copyright Michele Neylon

Copyright © 2023 · Magazine Pro on Genesis Framework · WordPress · Log in