all 17 comments

[–]313337 4 insightful - 1 fun4 insightful - 0 fun5 insightful - 1 fun -  (2 children)

I'm still getting 504 gateway timeout errors. Just reporting in...

[–]magnora7[S] 3 insightful - 1 fun3 insightful - 0 fun4 insightful - 1 fun -  (0 children)

Yup. The CPU upgrade is in the works. Should happen tonight or tomorrow at the very latest.

[–]magnora7[S] 2 insightful - 1 fun2 insightful - 0 fun3 insightful - 1 fun -  (0 children)

[–]Orangutan 4 insightful - 1 fun4 insightful - 0 fun5 insightful - 1 fun -  (0 children)

[–]OmegaUser296 2 insightful - 4 fun2 insightful - 3 fun3 insightful - 4 fun -  (1 child)

I can feel the influx of POWER!!!!!!

[–]HibikiBlack 3 insightful - 1 fun3 insightful - 0 fun4 insightful - 1 fun -  (1 child)

Thanks for the effort. I'm glad to hear this, I do notice a difference when compared to a few days ago.

[–]magnora7[S] 2 insightful - 1 fun2 insightful - 0 fun3 insightful - 1 fun -  (0 children)

Yeah, there are moments where it loads very quickly (which is when the CPU just happens to not have a load on it) but if a few things get queued up for the CPU the website basically becomes inoperable for about 5 seconds while the CPU catches up.

This is definitely what is happening when the site randomly hangs. I can watch it happen using CPU monitoring tools while browsing the site and it always matches up perfectly.

We're basically waiting for the server company to respond, we contacted them last evening.

[–]x0x7 3 insightful - 1 fun3 insightful - 0 fun4 insightful - 1 fun -  (5 children)

You could cache the pages with a soft ttl. Every page's content updates at most every 5 seconds. After 5 seconds a new calculation can be performed if and only if the server is at an acceptable load level. Otherwise the old content is used.

[–]magnora7[S] 1 insightful - 1 fun1 insightful - 0 fun2 insightful - 1 fun -  (3 children)

Actually I think that type of caching is already happening through our cloudflare caching, and we still can't handle the load! We're getting about 1,000 unique visitors an hour

[–]x0x7 2 insightful - 1 fun2 insightful - 0 fun3 insightful - 1 fun -  (2 children)

Not soft ttl. The idea is that it caches longer if the cpu is overloaded.

Usually on cloudflare you can only set something to be either cached or uncached. Your dynamically generated content is likely not being cached by cloudflare, just your javascript and images.

[–]magnora7[S] 1 insightful - 1 fun1 insightful - 0 fun2 insightful - 1 fun -  (1 child)

Ah I see, thanks for explaining some more. /u/d3rr and myself might look in to that

[–]x0x7 1 insightful - 1 fun1 insightful - 0 fun2 insightful - 1 fun -  (0 children)

Determining the cpu level might be expensive per page render and any means that isn't isn't going to be very fine resolutioned and therefore would be resonant.

A solution would be to have a rolling array of the timestamps of each of the last 15 renders. If the oldest of the last 15 is very new then let the page cache longer. That's assuming you have a cache in the first place though.

Then basically you can set a maximum frequency that your rendering engine will work at that you know your cpu can't surpassed anyway so you might as well not queue the task, and just defer to cache for one more request.

If you were using nodejs I could show you how to do it.

[–]d3rr 1 insightful - 1 fun1 insightful - 0 fun2 insightful - 1 fun -  (0 children)

This sounds like a pretty good idea. Is this something that could be implemented at the nginx level? I'll do some research into it.

[–]Enviro 2 insightful - 1 fun2 insightful - 0 fun3 insightful - 1 fun -  (1 child)

Seems fast already. Congrats.

[–]magnora7[S] 3 insightful - 1 fun3 insightful - 0 fun4 insightful - 1 fun -  (0 children)

Thanks. Glad it's working quickly for you right now. It does seem to be getting better, but I think that's just because traffic is a bit low at this time of day

[–]magnora7[S] 2 insightful - 1 fun2 insightful - 0 fun3 insightful - 1 fun -  (0 children)

[–]InsultingCow 1 insightful - 2 fun1 insightful - 1 fun2 insightful - 2 fun -  (0 children)

Don't forget the pylons!