Dedimania forum

Feel free to express yourself on your favorite dedicated related tool.

You are not logged in.

#1 2016-03-06 14:22:44

ToffeSmurf
tm2:tomvalk
New member
Registered: 2016-03-06
Posts: 6

Getting lots of timeouts, something wrong or not closing maybe?

Hello,
I'm working on dedimania implementation of a custom controller, but I found out that I receive much timeouts when trying to connect, also in the stats page's I can see the server, and not being timeout on the system. It seems that it's not closing.

(It's a new dedimania script I'm working on, and maybe that's the case?).

Thanks,
Toffe.

Offline

#2 2016-03-07 17:34:31

TX-Slig
slig
Fast author / Dedimania maintainer
From: Traxicoland
Registered: 2006-11-23
Posts: 878
Website

Re: Getting lots of timeouts, something wrong or not closing maybe?

With ~2000 opened connections, any server take time to answer to new connections. Else it would need a cluster with multiple servers which is not possible (cost), and also would need a real day to day support.

Like it is indicated in the beginning of http://dedimania.net:8082/Dedimania , all scripts should do a keepalive connection, ie not close it and use the already opened connection for next requests. It means to open it with compliant keepalive and timeout (5 minutes) headers.
The connection may take few seconds to initiate, but it should not be a real problem as it happens at beginning (and maybe after few long time a reconnection).

Also, scripts should do asynchronous request (using a select() or equivalent, or a thread in languages supporting it).


For tests (and only for tests !), you may use http://dedimania.net:8080/Dedimania , so it is easier to find on the http://dedimania.net:8082/stats page. Of course do tests on mini maps that you created especially for this, not on real maps, so that errors are not real problems. For production, always use http://dedimania.net:8082/Dedimania which is load balanced on all 8082+ ports.

On the http://dedimania.net:8082/stats page, any production server/script should look : State: OPEN , CompIn: deflate or gzip, CompOut: deflate or gzip, and Reqs increments after each request. If not all them are correct then your script is not ready for production !!!

Offline

#3 2016-03-08 15:05:49

ToffeSmurf
tm2:tomvalk
New member
Registered: 2016-03-06
Posts: 6

Re: Getting lots of timeouts, something wrong or not closing maybe?

Ok, thanks for the additional information. I think you mean port 8081 as testing?
The deflate/gzip is not yet done as I already saw...

Toffe

Offline

#4 2016-03-09 23:48:36

TX-Slig
slig
Fast author / Dedimania maintainer
From: Traxicoland
Registered: 2006-11-23
Posts: 878
Website

Re: Getting lots of timeouts, something wrong or not closing maybe?

Yes, you're right, 8081 for testing (8080 can only do read access on the replica database)

Offline

#5 2016-03-21 21:26:53

ToffeSmurf
tm2:tomvalk
New member
Registered: 2016-03-06
Posts: 6

Re: Getting lots of timeouts, something wrong or not closing maybe?

Hey Slig,
I'm pretty far with the dedimania implementation of the script, only got one problem right now. When sending the setChallengeTimes I get a 400, bad request. And really don't know what exactly is wrong in the requests.. The parameters are good, or at least they look good.

I can send you a XML payload of the request if you want (private please).

Thanks,
Toffe.

Offline

#6 2016-03-22 00:24:20

TX-Slig
slig
Fast author / Dedimania maintainer
From: Traxicoland
Registered: 2006-11-23
Posts: 878
Website

Re: Getting lots of timeouts, something wrong or not closing maybe?

I sent you a reply by e-mail.

Offline

Board footer

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson