• I’ve set up my first self-hosted web server with WordPress. When I’m working in wp-admin, I often get the timeout error ERR_CONNECTION_TIMED_OUT. The page will usually load if I refresh, although it sometimes takes multiple refreshes. When viewing the site, it takes longer to load each page than I think it should. As of now, it is a very simple site with just a couple of pages and one blog post. I’m hoping to get some guidance on how I can improve the performance of the site.

    My RPi is sitting 2 feet from me. But it is headless and I do everything in WP from another workstation. I’m using the DNS name and I know that the traffic is leaving my router and coming back in, rather than being resolved by the LAN.

    I’m using a dynamic DNS service (Dynu Services). Although I would expect the Windows DNS cache on my workstation would eliminate the dynamic DNS as the cause of the timeout error. Or am I overlooking something here?

    – The server is a Raspberry Pi 4 Model B (1.5GHz 64-bit quad-core ARMv8 CPU) with 4GB RAM, Raspbian 10 installed OS.
    I decided to use a Pi 4 rather than one of my Pi 3s for improved performance. Is a RPi 4 powerful enough to run a single WordPress site?

    – Apache 2.4.38 – I haven’t made any changes to Apache expect what WordPressed needed (allowing redirects via AllowOverride). Based on my online searches, my Apache instance is not doing any caching. Is there anything I need to change in the Apache configuration to improve performance?

    – PHP 7.3.14-1~deb10u1 – I haven’t adjusted the PHP configuration. I’ve seen posts about increasing the WP/PHP memory limit. But I have not had a memory related error while working in WordPress. Are there PHP settings that I should check or change to improve performance?

    – WP 5.4.1 – I have not yet installed any cache plug-ins. I was waiting until I was a little more comfortable with WordPress and my site. From what I’ve read online, a cache plug-in can sometimes cause problems and the cache needs to be cleared occasionally. So I was waiting until I had more time to research WordPress caching. Should I go ahead an install a cache plug-in?

    – I don’t have a lot of active plug-ins yet. My active plug-ins are Akismet Anti-Spam, Classic Editor, Health Check & Troubleshooting, Page Builder (SiteOrigin), SiteOrigin Widgets Bundle, UpdraftPlus – Backup/Restore, and WPForms Lite.

    – I’m currently using the Potter theme (version 1.1.6), although I have seen this issue with other themes as well. According to the web page for the Potter theme, it is supposed to be lightweight with great performance. Does anyone know of performance issues with this theme?

    My apologies for all of the questions. I have two WP books and I’ve been reading a lot of online articles to learn as much as I can. But I haven’t come across answers to these questions. It seems like they should be in a FAQ somewhere. But I haven’t found it if they are. ??

    Thank you for any advice you can provide!

    • This topic was modified 4 years, 6 months ago by t-p. Reason: Moved from Everything else WordPress

    The page I need help with: [log in to see the link]

Viewing 15 replies - 1 through 15 (of 25 total)
  • Moderator t-p

    (@t-p)

    Thread Starter jonrobertson

    (@jonrobertson)

    I’ve done those things, and more. Increased memory in php.ini to 128MB, increased WP_MEMORY_LIMIT to 128MB and WP_MAX_MEMORY_LIMIT to 128MB, and increased the PHP execution time to 60 seconds.

    I’ve checked the Apache, PHP, and MySQL caches. They are enabled, working, and have plenty of memory available. I’ve also installed and activated the WP Super Cache and Autoptimize plug-ins.

    I’ve monitored the Pi itself using htop and dstat tools. I’m still learning Linux and these tools are new to me, so I’m still figuring out how to use them well. Using the default options, I don’t see anything alarming.

    One area that I need to investigate is the SD card I/O performance while I’m working on my site.

    So what happens if you disable all plugins and switch to a default theme (twenty xyz)?

    Thread Starter jonrobertson

    (@jonrobertson)

    I came across this useful storage benchmark: James A. Chambers Raspberry Pi Storage Benchmarks

    He collects the results and provides them on his website. According to his benchmark, my SD card scored 1386. The best performing SD card in his benchmarks scored 1590.

    Based on this, I don’t think my SD card is the cause of the ERR_CONNECTION_TIMED_OUT responses. Unfortunately, I can’t tell what is.

    I’ve also learned that as I move around wp-admin, ERR_CONNECTION_TIMED_OUT messages appear in Chrome’s console even if the page loads correctly. Sometimes the page will partially load but not finish due to the timeouts.

    Thread Starter jonrobertson

    (@jonrobertson)

    My apologies. I still get timeouts if I switch to troubleshooting mode, with plug-ins disabled and using the TwentyTwenty theme.

    And any errors in the php or apache errorlogs?

    Thread Starter jonrobertson

    (@jonrobertson)

    error.log in /var/log/apache2 contains this when I restart apache using “sudo service apache2 restart”:

    [Sun May 17 09:47:49.128577 2020] [core:notice] [pid 25837] AH00094: Command line: '/usr/sbin/apache2'

    The WP debug log contains a couple of entries that I don’t know how to resolve. I haven’t modified any source directly. I tried re-installing via the admin update page but that did not resolve these:

    PHP Notice:  Undefined index: hook_suffix in /var/www/html/wp/wp-admin/includes/class-wp-screen.php on line 223
    PHP Notice:  Array to string conversion in /var/www/html/wp/wp-content/plugins/health-check/includes/class-health-check-debug-data.php on line 1172.

    And there is a theme related error. I’m going to reach out to the theme developer for this one:
    PHP Notice: Undefined variable: widget_footer_width in /var/www/html/wp/wp-content/themes/potter/inc/customizer/styles.php on line 2567

    Thread Starter jonrobertson

    (@jonrobertson)

    Would PHP log errors to somewhere aside from /var/log/apache2/error.log or the WP debug log?

    Thread Starter jonrobertson

    (@jonrobertson)

    Duh… My apologies. I’ve been in front of this monitor for too long. I just realized the message in appache’s error.log isn’t an error. It’s just an output of the command used to start the apache daemon/service.

    The PHP ones are mere notices as well, no valuable info there either I’m afraid. If I were you I would:
    * up the memory allocated to PHP to 256M to start with
    * enable WP debug (see https://www.ads-software.com/support/article/debugging-in-wordpress/#wp_debug)
    * install the Query Monitor plugin and see what that teaches you

    Thread Starter jonrobertson

    (@jonrobertson)

    WP Debug is enabled. That is where I found the “PHP Notice” messages. Does PHP have its own error log? Or would all PHP errors go to either the apache error.log or WP debug log?

    I have Query Monitor installed. I neglected to mention that earlier because it is hard to keep track of everything that I’ve tried. I’ve only used it for about 15 minutes and I haven’t taken the time to find a good “how-to” article to really learn how to use it. But from what I could determine, 4% of the queries are taking between 0.005 and 0.008 seconds. The rest are taking less than 0.002 seconds.

    I’ll bump up the PHP memory. From what I can tell, most of the Pi’s 4GB is not being used. Although I don’t have any knowledge of Linux memory usage/management like I do for Windows.

    Moderator t-p

    (@t-p)

    I’ve done those things, and more.

    Then contact your hosting provider.

    Thread Starter jonrobertson

    (@jonrobertson)

    I’ve done those things, and more.

    My RPi is sitting 2 feet from me

    I am my hosting provider.

    Moderator t-p

    (@t-p)

    I am my hosting provider.

    This is likely a hosting problem, not WordPress.

    Thread Starter jonrobertson

    (@jonrobertson)

    I realize it is likely an issue with the configuration of my Raspberry Pi 4/Apache/MySQL/PHP. However, the problem is specifically impacting my self-hosted WordPress site. I don’t have any issues with other web pages or phpMyAdmin.

    So I posted here hoping that someone with extensive WordPress experience could give me some guidance.

Viewing 15 replies - 1 through 15 (of 25 total)
  • The topic ‘Seeking guidance for ERR_CONNECTION_TIMED_OUT’ is closed to new replies.