Hacker News new | past | comments | ask | show | jobs | submit login

Site is dead slow...

    PS C:\> Measure-Command {curl.exe -I https://store.pine64.org/product-category/pinephone}
    TotalSeconds      : 23.2096005



(I guess now's a good time to actually register for HN -- we end up on here often enough...)

Hi, Pine64 sysadmin here... yea, our store doesn't like the big surges of traffic we get around product launches. As I speak, we've been getting about 600 concurrent connections for the last 30 minutes, and at least 450 for the last few hours.

We've done some optimization behind the scenes in anticipation, but it's clearly not enough. We're going to be doing some heavy upgrades right after these preorders close.


It looks like a Wordpress site, but caching or a CDN should resolve a lot of what feels slow, right?


P64 Sysadmin here: We are using heavy caching, on WP and also browser-side. It's still not enough.

We previously used Cloudflare, which obviously fixes most of these problems, but people in these types of circles tend to get pissy about CF.


PHP 5.4..?

I'd recommend setting up WP Super Cache (which you're using now) to serve static HTML files (not sure what caching method you are using). Then you need to configure Apache (or switch to nginx) to actually look for those files, otherwise the plugin won't do much (it generates PHP files by default which are taxing on the server). Another option would be to switch to the Cache Enabler plugin (along with Apache or nginx configuration) - static HTML page caching as simple as it gets. Oh and upgrade PHP.

Edit: For Cache Enabler, check suggested advanced configs at https://www.keycdn.com/support/wordpress-cache-enabler-plugi...

Edit2: CF would just by default cache your CSS/JS, wouldn't really solve the issues you're experiencing (most likely heavy PHP/MySQL load due to poorly configured caching). That said I haven't looked into the site that much, might be that you have a lot of portions of the site that can't be properly cached but then again most users shouldn't need to be logged in so doubt it.


Trust me, PHP 5.x is going to be one of the first things to go in a few days. Moving to PHP 7 should fix many of our issues in one go -- I hope. Along with a move to nginx (which the rest of our web infrastructure already uses). There's a long story as to why all this hasn't be done previously.

I'll look into changing the caching once we're over the worst of this. Forgive me if I don't want to make significant changes during a massive traffic spike. ;)


Haha, of course. :) Hope it turns out well!


since it's a webshop it will mostly be cache misses anyway for the static generated pages, not sure that will help a lot.


Yeah that was my only reservation, but the per-user customisation shouldn't be an issue unless you're logged in or have stuff added to the cart, so a general spike in traffic shouldn't (theoretically) affect it.


Maybe it makes sense to load off as much as possible from the static assets to another host, e.g. gitlab pages as "static.pine64.org" or similar?

I mean, most of the WP related assets do not have to be served through PHP necessarily, so they can free up some connections very easily.

If you need help with the webdev side of things to optimize/simplify more on the CSS/JS side, I'd love to help out in this project.


I wonder if you can serve directly on a different domain and put CF on the primary?


Yeah, their site has always been abysmal to use.

edit: to be fair, as others pointed out, it's likely that I've mainly ended up on their store after/during the hug of death from hn/reddit.


I've only ever seen it slow directly following an HN/Reddit post.

It may never have been _instant_ loading, but it's always felt fairly responsive to me.


It's not usually _this_ slow though


You sure it's not just powershell?


After some troubleshooting, it looks like it was actually your computer that was slowing everything down. If you could just stay off the internet forever I think it will be fine.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: