Server problems (split from "Anacreon Era III Discussion Thread")

General discussion for the game Anacreon
starxplor
Militia Lieutenant
Militia Lieutenant
Posts: 117
Joined: Sun Mar 31, 2013 7:49 am

Connection issues have been for more than just a day. At the worst times, nearly 1/4 of minute ticks fail to update and lose connection.
george moromisato
Developer
Developer
Posts: 2997
Joined: Thu Jul 24, 2003 9:53 pm
Contact:

starxplor wrote:
Tue May 09, 2017 6:47 am
Connection issues have been for more than just a day. At the worst times, nearly 1/4 of minute ticks fail to update and lose connection.
Is this still going on? It seems to be working fine for me.
starxplor
Militia Lieutenant
Militia Lieutenant
Posts: 117
Joined: Sun Mar 31, 2013 7:49 am

It was when I posted that comment, I haven't gotten into the game until now for today, will edit this post to update in a bit.

EDIT:
The game appears to be taking a long time to load. Even after the interface is loaded, the page is still 'loading' as Firefox has the spinning blue circle. This is not likely to be a local network issue, other website and network use do not appear to be slow.

EDIT 2:
I just got a timeout error. I ordered a fleet to take a planet and before it completed the update timer stuck at a full completed circle. When I tried to move the galaxy space it turned solid black with ERROR: timeout on it.
Last edited by starxplor on Wed May 10, 2017 4:08 am, edited 1 time in total.
george moromisato
Developer
Developer
Posts: 2997
Joined: Thu Jul 24, 2003 9:53 pm
Contact:

starxplor wrote:
Wed May 10, 2017 3:49 am
It was when I posted that comment, I haven't gotten into the game until now for today, will edit this post to update in a bit.

EDIT:
The game appears to be taking a long time to load. Even after the interface is loaded, the page is still 'loading' as Firefox has the spinning blue circle. This is not likely to be a local network issue, other website and network use do not appear to be slow.
Try using: http://anacreon2.kronosaur.com

That will by-pass Cloudflare, which may or may not be the problem. Let me know one way or the other so I can narrow it down.
starxplor
Militia Lieutenant
Militia Lieutenant
Posts: 117
Joined: Sun Mar 31, 2013 7:49 am

The initial page at the new address took a while to load, but once it did, the game list and loading game screens were much quicker. I will play around a bit to see if I get any errors.

Thanks!

EDIT:
Looks like world TL icons are showing up but designation icons are not loading.

EDIT 2:
Tried force reload of the game map screen to see if I could get the designation icons and now that page is stuck trying to load.

EDIT 3:
It happened again. I attacked a world and before it completed the attack (while on transport landing phase) the minute tick timer filled its circle and just hung there. After a short time, moving the galaxy map resulted in ERROR: timeout
Also, when finally getting the map to reload to fix the designation icons, I got those icons but lost the border/background of the selected planet making it hard to read with translucent background.

EDIT 4:
It happened again. This time, no attacking. I ordered a fleet to go to another world, went to read something on a different browser tab while it moved, came back and got the same timeout error when moving to see how far the fleet got.

EDIT 5:
Happened again, ordered the same fleet mentioned above to go to another planet and it didn't even get off the planet it came from before it froze trying to update and gave timeout error when I moved the field.

I wont bother updating any more unless I see something different happening.
george moromisato
Developer
Developer
Posts: 2997
Joined: Thu Jul 24, 2003 9:53 pm
Contact:

starxplor wrote:
Wed May 10, 2017 4:12 am
...
EDIT 5:
Happened again, ordered the same fleet mentioned above to go to another planet and it didn't even get off the planet it came from before it froze trying to update and gave timeout error when I moved the field.

I wont bother updating any more unless I see something different happening.
Sorry, I was rebooting the server and router just now (probably as you were testing).
starxplor
Militia Lieutenant
Militia Lieutenant
Posts: 117
Joined: Sun Mar 31, 2013 7:49 am

Just tried to load the game again, with the anacreon2 link, Firefox is just sitting there spinning... finally got purple game spinner on screen, still no game field though.

EDIT:
Other sites, including these forums, are loading fine.

EDIT 2:
Still getting the timeout error.

EDIT 3:
Been playing for a while without an error.

EDIT 4:
The game has been open for the last few hours now without any issues. Could it be a lack of players interacting during this time?

EDIT 5:
And now, trying to load the main page with login option I am getting a cloudflare error. Loading anacreon2 comes up right away with no delays or errors.
george moromisato
Developer
Developer
Posts: 2997
Joined: Thu Jul 24, 2003 9:53 pm
Contact:

starxplor wrote:
Wed May 10, 2017 6:40 am
Just tried to load the game again, with the anacreon2 link, Firefox is just sitting there spinning... finally got purple game spinner on screen, still no game field though.

EDIT:
Other sites, including these forums, are loading fine.

EDIT 2:
Still getting the timeout error.

EDIT 3:
Been playing for a while without an error.

EDIT 4:
The game has been open for the last few hours now without any issues. Could it be a lack of players interacting during this time?

EDIT 5:
And now, trying to load the main page with login option I am getting a cloudflare error. Loading anacreon2 comes up right away with no delays or errors.
This is helpful--thank you!

I don't know exactly what's going on, but I'm going to add more diagnostic support to the server to help me track it down. I have a few theories, which I hope the diagnostics will help me test:

THEORY 1: Cloudflare problems. Cloudflare is basically a cache of your server. When you connect to anacreon.kronosaur.com, Cloudflare looks in its cache to see if it already has the page. If not, it contacts my server to get it. Cloudflare is mostly designed for very high-traffic sites,which are always being hit, meaning that they almost always get a cache hit. But for a low-traffic site like Anacreon, the page is almost never in the cache, so it takes longer to get the page. Moreover, it has to then add the page to its cache.

I've noticed that the first time I hit the Anacreon page, it takes a while, but after that, it goes fast.

Of course, it's fair to ask why Cloudflare takes so long to connect to my server to get the real page. That could be a Cloudflare problem (congestion) but most likely it is a problem with my server.

THEORY 2: Peak requests limit. When you load a page in your browser, the browser makes multiple connections to the server to get things as fast as possible. Each separate image can result in a separate connection. My server is designed to handle lots of simultaneous connections. Right now, for example, it has 300+ connections, 70 of which are active.

But the server uses a thread-pool model. Instead of having 1 thread per connection (which would never scale), it uses a pool of threads which take turns handling connections that need attention. This is much more efficient, since 90% of the time a connection is just waiting for stuff to transmit.

But what if, for some reason, all threads in the pool get stuck handling requests. Maybe we got so many requests at once that all threads are busy handling them. In that case, any additional requests would be stuck until a thread frees up.

THEORY 3: Communications protocol problems. Another possibility is that my server has a bug in how it talks to browsers. HTTP is a pretty simple protocol, but there are enough differences between clients that I might have missed some subtlety.

In particular, HTTP doesn't have a simple way of determining when a response is complete. There is no "Message Done" token or a consistent byte-length indicator. Depending on the compression setting, the method and various headers, there are different ways of telling that the message is done.

If my server screwed up in some way, then the client (browser or Cloudflare) might think that there's still data to come, but my server thinks it's done with the response. The client will wait forever (or until it times out) for a message that never comes.

Over the next few month I'm going to add various diagnostics to the server to help me test these theories.
User avatar
AssumedPseudonym
Fleet Officer
Fleet Officer
Posts: 1190
Joined: Thu Aug 29, 2013 5:18 am
Location: On the other side of the screen.

george moromisato wrote:THEORY 1: Cloudflare problems.
 Speaking for myself, I’ve had a couple of sites (including the Ministry) spit out Cloudflare errors over the past few days, for whatever that’s worth.
Image

Mod prefixes: 0xA010 (registered) and 0xDCC8 (miscellaneous)

My mods on Xelerus: Click here!

Of all the things I’ve lost in life, I miss my mind the least. (I’m having a lot more fun without it!)
starxplor
Militia Lieutenant
Militia Lieutenant
Posts: 117
Joined: Sun Mar 31, 2013 7:49 am

Found something interesting:
(using anacreon2 URL) I left my browser open with the game field for hours, without interacting with it. No timeout error. I come back to my computer and start doing some things, moving fleets, attacking a world, establishing trade routes. Now, I get the timeout error again.

EDIT:
So, I deployed and sent a couple dozen explorer fleets around to different planets, with no issues. I went back and attempted to attack a pair of planets and got the timeout error.

EDIT 2:
About 99% of the time, if I have attacked a planet, I get the timeout error before completing the attack. Usually after the fleet destruction, while landing or after landing. The tick following what ends up being a successful invasion is usually waited for before the planet will show as under my control, but most of the time, that ticket update ends up being the one that times out.
Occasionally, I get the timeout error when not attacking a planet, maybe 10% of the time if I have not attacked lately and 50% of the time if I have recently attacked a planet.

EDIT 3:
Woohoo! Had two successful planet invasions in a row without the timeout error.

EDIT 4:
Third planet invasion without timeout error.

EDIT 5 (next day) (tested both anacreon and anacreon2):
Using Firefox's Debugger, I can see when I try to load the game that the main page loads, the images take a little time but eventually load and then it hangs after requesting getGameInfo. So far, for the last half hour or so, I have been unable to get the game to completely load even once.

EDIT 6:
And now it loads quickly with no delay on any http request.
Oddball
Commonwealth Pilot
Commonwealth Pilot
Posts: 52
Joined: Sat Jul 19, 2014 4:27 pm

I had identical issues as starxplor.
My work around was changing between browsers. When FF timed out, went to G and vice versa.

Google seemed to have less problems, but the problems did still exist just not as often.

So far today I have had no problems with either g or ff browsers
starxplor
Militia Lieutenant
Militia Lieutenant
Posts: 117
Joined: Sun Mar 31, 2013 7:49 am

I wasnt having any issues today until now:
ERROR: Cannot send message to address: Anacreon.command.
george moromisato
Developer
Developer
Posts: 2997
Joined: Thu Jul 24, 2003 9:53 pm
Contact:

starxplor wrote:
Sat May 13, 2017 3:25 am
I wasnt having any issues today until now:
ERROR: Cannot send message to address: Anacreon.command.
That's a separate bug, which I've also been tracking. I think with this occurrence I have enough info to fix it.

Meanwhile, I've restarted the Anacreon module, which fixed the issue.

Thanks and sorry.
starxplor
Militia Lieutenant
Militia Lieutenant
Posts: 117
Joined: Sun Mar 31, 2013 7:49 am

Thanks for such a quick fix/response!

EDIT:
Lots of ERROR: OK messages, occasional ERROR: timeout messages.
Additionally, interactions(transfer, trade route changes, fleet destinations...) often take multiple attempts or only go through on the minute ticks.
Oddball
Commonwealth Pilot
Commonwealth Pilot
Posts: 52
Joined: Sat Jul 19, 2014 4:27 pm

Server problems have started again. Huge time lags, time out errors etc. same problems as before very bad this morning can't stay connected with either browser.
Post Reply