barolet / kovans-ogbot

Automatically exported from code.google.com/p/kovans-ogbot
0 stars 0 forks source link

Daily inactives scan/respying planets: too long or maybe infinte loop #220

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
***Bot version: 2.2a, 2.2b10 (compiled src)
***OGame server language: EN
***OGame server version: 0.76b (and this can be the reason!)
***Operating System: win

***Description of the problem:
It takes a VERY long time (perharps infinite loop) to make daily 
background scan or to build a new planets database. Besides, all this time 
a deuterium is used for galaxy views -- much more than it is needed for 
(radius * 2) * sourcePlanetsNumber. The problem appeared yesterday (15.06) 
in the evening (the morning daily scan was fast and successful as usual) 
and still exist now. I tried both 2.2b10 sources and the last 2.2a 
sources, the problem is the same.

There is one more strange and dangerous problem. After stopping bot, some 
thread continues to run, and it seems that it is the thread of looking 
through galaxies. If after that a user starts bot, or manages account 
himself, they both will have problems. The main, but not the only, is that 
this thread takes the whole internet bandwidth.

I can see only one reason for it -- a new 0.76b version of OGame that was 
installed 15.06 about ~13:00 server time. There seems to be no changes in 
its changelog that can influence galaxy views, but it means nothing, as 
you understand.

***Log contents:
Just stops logging anything after "Searching inactive planets in range..."

***Please provide any additional information below:
It is cycling inside this cycle:
---OGBot.py#scanGalaxies()---
        for galaxy, solarSystem, foundPlanets, htmlSource in 
self.web.getSolarSystems(self.reachableSolarSystems, 
deuteriumSourcePlanet):
            for planet in foundPlanets:
                allInactives.append(planet)

---
Deuterium is used everytime, I repeat.

Original issue reported on code.google.com by perebo...@gmail.com on 16 Jun 2007 at 8:48

GoogleCodeExporter commented 8 years ago
I have found Issue #203. Seems that it is the same...

Original comment by perebo...@gmail.com on 16 Jun 2007 at 8:58

GoogleCodeExporter commented 8 years ago
Tried radius 2 and 1 planet:

06/16/07 11:46:05 Inactive search finished. 4 inactives (4 new) found in 5 
solar 
sytems (5.8 secs. per solar system).

Original comment by perebo...@gmail.com on 16 Jun 2007 at 9:48

GoogleCodeExporter commented 8 years ago

Original comment by jsceballos on 16 Jun 2007 at 12:10

GoogleCodeExporter commented 8 years ago
Reproduced in 2.2b (June 17 release) :(

Original comment by perebo...@gmail.com on 18 Jun 2007 at 10:46

GoogleCodeExporter commented 8 years ago
It seems that problem is in multi-thread galaxy scanning. It results in many 
"url 
open timeout"s or sometimes error page responses.

Original comment by perebo...@gmail.com on 18 Jun 2007 at 12:28

GoogleCodeExporter commented 8 years ago
Umm, I'm curious about this one.
You say that you get many url open timeouts and error pages. If the error pages 
are
of the kind "your last request could not be processed", that is normal. But I 
guess
it is not the case, as if it was the loop would not be infinite, and I think the
deuterium would not go down.
A router saturated with connections cannot be either because again deuterium 
would
not go down.
It might be that the code in ScanThread is raising some exception that prevents 
the
loop to finish, but in that case it would be printed to console (assuming you 
are in
debug mode).

Original comment by jsceballos on 22 Jun 2007 at 1:20

GoogleCodeExporter commented 8 years ago
It's not the infinite loop, I've checked. Now in v2.2 (June 10) it takes about 
half 
an hour to scan ~180 systems. But in debug mode I see mostly "urlopen timeout" 
and 
dumps of html sources (not fully loaded,  suppose). I'll post an example here a 
bit 
later.

It seems to me that something in a new OGame version 0.76b doesn't allow multi-
thread scanning anymore. At least, makes it not optimal. I have seen a 
complaint in 
forum -- someone wrote that not long ago it began to need several hours for 
full 
scan, while earlier it took a pair of minutes...

Also I've wrote some words about daily scan on forum: 
http://ns23463.ovh.net/kovans-ogbot-forum/viewtopic.php?
f=4&t=46&sid=91aa250c4f5f0a94248332d082a1ddc6

Original comment by perebo...@gmail.com on 22 Jun 2007 at 5:22

GoogleCodeExporter commented 8 years ago
Debug output is mostly:

-- <urlopen error timed out>
-- "timed out"
-- and just pieces of html terminated with "\r\n"
-- plus, of course, fetched and parsed galaxy views, in random order

Half an hour is acceptable, of course, but I really don't like that muti-thread 
scanning in random order (see my post on board). A human can never act this 
way..

Original comment by perebo...@gmail.com on 22 Jun 2007 at 6:29

GoogleCodeExporter commented 8 years ago

Original comment by kovansog...@gmail.com on 13 Jan 2009 at 3:26