Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bot pauses / gets stuck / SQL remote issue #3874

Closed
Trico3 opened this issue Aug 13, 2016 · 9 comments
Closed

Bot pauses / gets stuck / SQL remote issue #3874

Trico3 opened this issue Aug 13, 2016 · 9 comments

Comments

@Trico3
Copy link

Trico3 commented Aug 13, 2016

Expected Behavior

Bot to run for longer than an hour without stopping

Actual Behavior

Bot runs for roughly 20-40 min then stops without any errors in python, seems like once it is stuck / paused it does not respond to the CTR + C command immediately, about a minute later it outputs [PokemonGoBot] [INFO] [bot_exit] Exiting bot.

Your config.json (remove your credentials and any other private info)

{
    "auth_service": "google",
    "username": "xxxxx",
    "password": "xxxx",
    "location": "xxxx",
    "gmapkey": "xxxx",
    "encrypt_location": "",
    "tasks": [{
        "type": "HandleSoftBan"
    }, {
        "type": "SleepSchedule",
        "config": {
            "enabled": false,
            "time": "22:54",
            "duration": "7:46",
            "time_random_offset": "00:24",
            "duration_random_offset": "00:43"
        }
    }, {
        "type": "CollectLevelUpReward"
    }, {
        "type": "IncubateEggs",
        "config": {
            "longer_eggs_first": true
        }
    }, {
        "type": "UpdateLiveStats",
        "config": {
            "enabled": false,
            "min_interval": 10,
            "stats": ["uptime", "stardust_earned", "xp_earned", "xp_per_hour", "stops_visited"],
            "terminal_log": true,
            "terminal_title": true
        }
    }, {
        "type": "TransferPokemon"
    }, {
        "type": "EvolvePokemon",
        "config": {
            "evolve_all": "none",
            "first_evolve_by": "cp",
            "evolve_above_cp": 500,
            "evolve_above_iv": 0.8,
            "logic": "or",
            "evolve_speed": 20,
            "use_lucky_egg": false
        }
    }, {
        "type": "RecycleItems",
        "config": {
            "min_empty_space": 25,
            "item_filter": {
                "Pokeball": {
                    "keep": 0
                },
                "Greatball": {
                    "keep": 98
                },
                "Ultraball": {
                    "keep": 52
                },
                "Potion": {
                    "keep": 1
                },
                "Super Potion": {
                    "keep": 2
                },
                "Hyper Potion": {
                    "keep": 5
                },
                "Revive": {
                    "keep": 4
                },
                "Razz Berry": {
                    "keep": 20
                }
            }
        }
    }, {
        "type": "CatchVisiblePokemon"
    }, {
        "type": "CatchLuredPokemon"
    }, {
        "type": "SpinFort"
    }, {
        "type": "MoveToMapPokemon",
        "config": {
            "address": "4x.xx.xxx.52:5000",
            "max_distance": 500,
            "min_time": 80,
            "min_ball": 25,
            "prioritize_vips": true,
            "snipe": false,
            "snipe_high_prio_only": true,
            "snipe_high_prio_threshold": 600,
            "update_map": true,
            "mode": "priority",
            "catch": {
                "==========Legendaries==========": 0,
                "Aerodactyl": 1000,
                "Snorlax": 1000,
                "Articuno": 1000,
                "Zapdos": 1000,
                "Moltres": 1000,
                "Dratini": 1000,
                "Dragonair": 1000,
                "Dragonite": 1000,
                "Mewtwo": 1000,
                "Mew": 1000,
                "==========Region Locked==========": 0,
                "Farfetch'd": 1000,
                "Kangaskhan": 1000,
                "Mr. Mime": 1000,
                "Tauros": 1000,
                "==========Very Rare==========": 0,
                "Lapras": 900,
                "Electabuzz": 900,
                "Magmar": 900,
                "Ditto": 900,
                "==========Starters==========": 0,
                "Bulbasaur": 400,
                "Ivysaur": 600,
                "Venusaur": 1000,
                "Charmander": 400,
                "Charmeleon": 600,
                "Charizard": 1000,
                "Squirtle": 400,
                "Wartortle": 600,
                "Blastoise": 1000,
                "Pikachu": 600,
                "Raichu": 1000,
                "==========Semi Rare==========": 0,
                "Porygon": 200,
                "Scyther": 200,
                "Jynx": 200,
                "==========Uncommon==========": 0,
                "Omanyte": 150,
                "Omastar": 500,
                "Seel": 300,
                "Dewgong": 500,
                "Grimer": 200,
                "Muk": 500,
                "Shellder": 200,
                "Cloyster": 500,
                "Haunter": 500,
                "Gengar": 1000,
                "Onix": 600,
                "Vulpix": 200,
                "Ninetales": 600,
                "Paras": 100,
                "Parasect": 500,
                "Growlithe": 200,
                "Arcanine": 700,
                "Tentacool": 200,
                "Tentacruel": 500,
                "Mankey": 150,
                "Primeape": 500,
                "Clefairy": 150,
                "Clefable": 500,
                "Jigglypuff": 150,
                "Wigglytuff": 500,
                "Venonat": 100,
                "Venomoth": 500,
                "Diglett": 200,
                "Dugtrio": 500,
                "Meowth": 250,
                "Persian": 500,
                "Psyduck": 150,
                "Golduck": 500,
                "Geodude": 100,
                "Graveler": 500,
                "Golem": 800,
                "Eevee": 200,
                "Vaporeon": 800,
                "Jolteon": 800,
                "Flareon": 800,
                "Kabuto": 150,
                "Kabutops": 500,
                "Magikarp": 150,
                "Gyarados": 800,
                "Pinsir": 150,
                "Ponyta": 200,
                "Rapidash": 500,
                "Slowpoke": 200,
                "Slowbro": 500,
                "Magnemite": 250,
                "Magneton": 500,
                "Kingler": 500,
                "Voltorb": 200,
                "Electrode": 500,
                "Exeggcute": 250,
                "Exeggcutor": 500,
                "Cubone": 300,
                "Marowak": 800,
                "Hitmonlee": 400,
                "Hitmonchan": 400,
                "Lickitung": 500,
                "Koffing": 200,
                "Weezing": 500,
                "Rhyhorn": 200,
                "Rhydon": 500,
                "Chansey": 800,
                "Tangela": 300,
                "Horsea": 200,
                "Seadra": 600,
                "Goldeen": 150,
                "Seaking": 500,
                "Staryu": 200,
                "Starmie": 800,
                "==========T1 Evolvers==========": 0,
                "Caterpie": 10,
                "Metapod": 10,
                "Butterfree": 500,
                "Weedle": 10,
                "Kakuna": 10,
                "Beedrill": 500,
                "Pidgeotto": 10,
                "Pidgeot": 300,
                "==========T2 Evolvers==========": 0,
                "Nidoran F": 10,
                "Nidorina": 10,
                "Nidoqueen": 10,
                "Nidoran M": 10,
                "Nidorino": 10,
                "Nidoking": 10,
                "Oddish": 100,
                "Gloom": 200,
                "Vileplume": 600,
                "Poliwag": 200,
                "Poliwhirl": 400,
                "Poliwrath": 800,
                "Abra": 300,
                "Kadabra": 600,
                "Alakazam": 800,
                "Machop": 150,
                "Machoke": 400,
                "Machamp": 800,
                "Bellsprout": 100,
                "Weepinbell": 400,
                "Victreebel": 800,
                "==========Trash==========": 0,
                "Rattata": 10,
                "Raticate": 10,
                "Spearow": 10,
                "Fearow": 10,
                "Ekans": 10,
                "Arbok": 10,
                "Sandshrew": 10,
                "Sandslash": 10,
                "Zubat": 10,
                "Golbat": 10,
                "Doduo": 10,
                "Dodrio": 10
            }
        }
    }, {
        "type": "MoveToFort",
        "config": {
            "lure_attraction": true,
            "lure_max_distance": 2000
        }
    }, {
        "type": "FollowSpiral",
        "config": {
            "diameter": 4,
            "step_size": 70
        }
    }],
    "map_object_cache_time": 5,
    "forts": {
        "avoid_circles": true,
        "max_circle_size": 50,
        "cache_recent_forts": true
    },
    "websocket_server": true,
    "walk": 10,
    "action_wait_min": 1,
    "action_wait_max": 4,
    "debug": false,
    "test": false,
    "health_record": false,
    "location_cache": true,
    "distance_unit": "km",
    "reconnecting_timeout": 15,
    "catch_randomize_reticle_factor": 1.0,
    "catch_randomize_spin_factor": 1.0,
    "min_ultraball_to_keep": 10,
    "logging_color": true,
    "catch": {
        "any": {
            "catch_above_cp": 0,
            "catch_above_iv": 0,
            "logic": "or"
        },
        "// Example of always catching Rattata:": {},
        "// Rattata": {
            "always_catch": true
        }
    },
    "catch_throw_parameters": {
        "excellent_rate": 0.1,
        "great_rate": 0.5,
        "nice_rate": 0.3,
        "normal_rate": 0.1,
        "spin_success_rate": 0.6
    },
    "release": {
        "any": {
            "keep_best_cp": 1,
            "keep_best_iv": 1
        },

        "// KEEPERS --": {},
        "Ditto": {
            "keep_best_cp": 4,
            "keep_best_iv": 2
        },
        "Vaporeon": {
            "keep_best_cp": 4,
            "keep_best_iv": 2
        },
        "Snorlax": {
            "keep_best_cp": 5,
            "keep_best_iv": 5
        },
        "Articuno": {
            "keep_best_cp": 5,
            "keep_best_iv": 5
        },
        "Gyarados": {
            "keep_best_cp": 5,
            "keep_best_iv": 5
        },
        "Zapdos": {
            "keep_best_cp": 5,
            "keep_best_iv": 5
        },
        "Moltres": {
            "keep_best_cp": 5,
            "keep_best_iv": 5
        },
        "Dragonite": {
            "keep_best_cp": 5,
            "keep_best_iv": 5
        },
        "Lapras": {
            "keep_best_cp": 5,
            "keep_best_iv": 5
        },
        "Venusaur": {
            "keep_best_cp": 2,
            "keep_best_iv": 2
        },
        "Charizard": {
            "keep_best_cp": 2,
            "keep_best_iv": 2
        },
        "Blastoise": {
            "keep_best_cp": 2,
            "keep_best_iv": 2
        },
        "Pikachu": {
            "keep_best_cp": 2,
            "keep_best_iv": 2
        },
        "Raichu": {
            "keep_best_cp": 2,
            "keep_best_iv": 2
        },
        "Nidoqueen": {
            "keep_best_cp": 2,
            "keep_best_iv": 2
        },
        "Nidoking": {
            "keep_best_cp": 2,
            "keep_best_iv": 2
        },
        "Clefable": {
            "keep_best_cp": 2,
            "keep_best_iv": 2
        },
        "Ninetales": {
            "keep_best_cp": 2,
            "keep_best_iv": 2
        },
        "Wigglytuff": {
            "keep_best_cp": 2,
            "keep_best_iv": 2
        },
        "Vileplume": {
            "keep_best_cp": 2,
            "keep_best_iv": 2
        },
        "Arcanine": {
            "keep_best_cp": 10,
            "keep_best_iv": 2
        },
        "Poliwrath": {
            "keep_best_cp": 2,
            "keep_best_iv": 2
        },
        "Alakazam": {
            "keep_best_cp": 2,
            "keep_best_iv": 2
        },
        "Victreebel": {
            "keep_best_cp": 2,
            "keep_best_iv": 2
        },
        "Slowbro": {
            "keep_best_cp": 2,
            "keep_best_iv": 2
        },
        "Farfetch'd": {
            "keep_best_cp": 2,
            "keep_best_iv": 2
        },
        "Muk": {
            "keep_best_cp": 2,
            "keep_best_iv": 2
        },
        "Exeggutor": {
            "keep_best_cp": 2,
            "keep_best_iv": 2
        },
        "Chansey": {
            "keep_best_cp": 2,
            "keep_best_iv": 2
        },
        "Kangaskhan": {
            "keep_best_cp": 2,
            "keep_best_iv": 2
        },
        "Starmie": {
            "keep_best_cp": 2,
            "keep_best_iv": 2
        },
        "Mr. Mime": {
            "keep_best_cp": 2,
            "keep_best_iv": 2
        },
        "Tauros": {
            "keep_best_cp": 2,
            "keep_best_iv": 2
        },
        "Jolteon": {
            "keep_best_cp": 2,
            "keep_best_iv": 2
        },
        "Flareon": {
            "keep_best_cp": 2,
            "keep_best_iv": 2
        },
        "Kabutops": {
            "keep_best_cp": 2,
            "keep_best_iv": 2
        },
        "Mewtwo": {
            "keep_best_cp": 2,
            "keep_best_iv": 2
        },
        "Mew": {
            "keep_best_cp": 2,
            "keep_best_iv": 2
        },
        "Arbok": {
            "keep_best_cp": 1,
            "keep_best_iv": 1
        },
        "Sandslash": {
            "keep_best_cp": 1,
            "keep_best_iv": 1
        },
        "Golbat": {
            "keep_best_cp": 1,
            "keep_best_iv": 1
        },
        "Parasect": {
            "keep_best_cp": 1,
            "keep_best_iv": 1
        },
        "Dugtrio": {
            "keep_best_cp": 1,
            "keep_best_iv": 1
        },
        "Persian": {
            "keep_best_cp": 1,
            "keep_best_iv": 1
        },
        "Golduck": {
            "keep_best_cp": 1,
            "keep_best_iv": 1
        },
        "Primeape": {
            "keep_best_cp": 1,
            "keep_best_iv": 1
        },
        "Growlithe": {
            "keep_best_cp": 1,
            "keep_best_iv": 1
        },
        "Machamp": {
            "keep_best_cp": 1,
            "keep_best_iv": 1
        },
        "Rapidash": {
            "keep_best_cp": 1,
            "keep_best_iv": 1
        },
        "Magneton": {
            "keep_best_cp": 1,
            "keep_best_iv": 1
        },
        "Dodrio": {
            "keep_best_cp": 1,
            "keep_best_iv": 1
        },
        "Dewgong": {
            "keep_best_cp": 1,
            "keep_best_iv": 1
        },
        "Gengar": {
            "keep_best_cp": 1,
            "keep_best_iv": 1
        },
        "Onix": {
            "keep_best_cp": 1,
            "keep_best_iv": 1
        },
        "Hypno": {
            "keep_best_cp": 1,
            "keep_best_iv": 1
        },
        "Electrode": {
            "keep_best_cp": 1,
            "keep_best_iv": 1
        },
        "Marowak": {
            "keep_best_cp": 1,
            "keep_best_iv": 1
        },
        "Hitmonlee": {
            "keep_best_cp": 1,
            "keep_best_iv": 1
        },
        "Hitmonchan": {
            "keep_best_cp": 1,
            "keep_best_iv": 1
        },
        "Lickitung": {
            "keep_best_cp": 1,
            "keep_best_iv": 1
        },
        "Weezing": {
            "keep_best_cp": 1,
            "keep_best_iv": 1
        },
        "Tangela": {
            "keep_best_cp": 1,
            "keep_best_iv": 1
        },
        "Scyther": {
            "keep_best_cp": 1,
            "keep_best_iv": 1
        },
        "Jynx": {
            "keep_best_cp": 1,
            "keep_best_iv": 1
        },
        "Electabuzz": {
            "keep_best_cp": 1,
            "keep_best_iv": 1
        },
        "Magmar": {
            "keep_best_cp": 1,
            "keep_best_iv": 1
        },
        "Pinsir": {
            "keep_best_cp": 1,
            "keep_best_iv": 1
        },
        "Porygon": {
            "keep_best_cp": 1,
            "keep_best_iv": 1
        },
        "Omastar": {
            "keep_best_cp": 1,
            "keep_best_iv": 1
        },
        "Aerodactyl": {
            "keep_best_cp": 1,
            "keep_best_iv": 1
        },

        "// EVOLVERS": {},
        "Magikarp": {
            "keep_best_iv": 4
        },
        "Bulbasaur": {
            "keep_best_iv": 2
        },
        "Ivysaur": {
            "keep_best_iv": 2
        },
        "Charmander": {
            "keep_best_iv": 2
        },
        "Charmeleon": {
            "keep_best_iv": 2
        },
        "Squirtle": {
            "keep_best_iv": 2
        },
        "Wartortle": {
            "keep_best_iv": 2
        },
        "Clefairy": {
            "keep_best_iv": 2
        },
        "Vulpix": {
            "keep_best_iv": 2
        },
        "Jigglypuff": {
            "keep_best_iv": 2
        },
        "Oddish": {
            "keep_best_iv": 2
        },
        "Gloom": {
            "keep_best_iv": 2
        },
        "Poliwag": {
            "keep_best_iv": 2
        },
        "Poliwhirl": {
            "keep_best_iv": 2
        },
        "Abra": {
            "keep_best_iv": 2
        },
        "Kadabra": {
            "keep_best_iv": 2
        },
        "Bellsprout": {
            "keep_best_iv": 2
        },
        "Weepinbell": {
            "keep_best_iv": 2
        },
        "Slowpoke": {
            "keep_best_iv": 2
        },
        "Grimer": {
            "keep_best_iv": 2
        },
        "Exeggcute": {
            "keep_best_iv": 2
        },
        "Staryu": {
            "keep_best_iv": 2
        },
        "Eevee": {
            "keep_best_iv": 2
        },
        "Dratini": {
            "keep_best_iv": 2
        },
        "Dragonair": {
            "keep_best_iv": 2
        },
        "Ponyta": {
            "keep_best_iv": 1
        }

    },
    "vips": {
        "Any pokemon put here directly force to use Berry & Best Ball to capture, to secure the capture rate!": {},
        "any": {
            "catch_above_cp": 1200,
            "catch_above_iv": 0.9,
            "logic": "or"
        },
        "Lapras": {},
        "Moltres": {},
        "Zapdos": {},
        "Articuno": {},

        "// S-Tier pokemons (if pokemon can be evolved into tier, list the representative)": {},
        "Mewtwo": {},
        "Dragonite": {},
        "Snorlax": {},
        "// Mew evolves to Mewtwo": {},
        "Mew": {},
        "Arcanine": {},
        "Vaporeon": {},
        "Gyarados": {},
        "Exeggutor": {},
        "Muk": {},
        "Weezing": {},
        "Flareon": {},

        "// Rares": {},
        "Kangaskhan": {},
        "Jolteon": {},
        "Rapidash": {},
        "Pinsir": {},
        "Scyther": {},
        "Charizard": {},
        "Blastoise": {},
        "Venusaur": {},
        "Ninetales": {},
        "Omastar": {},
        "Aerodactyl": {},
        "Magmar": {},
        "Kabutops": {},
        "Electabuzz": {},
        "Mr. Mime": {},
        "Raichu": {},
        "Alakazam": {},
        "Tauros": {},
        "Pikachu": {},
        "Ditto": {},
        "Farfetch'd": {}
    }
}

Steps to Reproduce

Other Information

OS:Windows 7
Branch: dev
Git Commit:
$ git log -n 1 --pretty=format:"%H"
9b72ee5

Python Version:
$ python -V
Python 2.7.12

stuckbot

@k4n30
Copy link
Contributor

k4n30 commented Aug 14, 2016

What's your resource usage on your PC at the time you experience the issue? (Ctrl + Shift + Esc)

@Trico3
Copy link
Author

Trico3 commented Aug 14, 2016

While the bot is running my resource usage is at:
CPU Usage: 25%
Physical Memory: 60% / ~5-6GB out of 8GB is in use ( Google Chrome is a big memory hog )
I also had the assumption that it could be related to the cpu or ram being maxed out, but even after a pc restart and only the bot process running the issue still persisted (around 30 min mark ish it would come to a halt), i have also tried it on a fresh bot installation.

@Trico3
Copy link
Author

Trico3 commented Aug 14, 2016

This time it occurred around 10 minute mark,
Not sure if this will help or not but here is the last lines of log before I CTR + C:

2016-08-13 19:24:14,029 [MoveToMapPokemon] [INFO] [move_to_map_pokemon_move_towards] Moving towards Beedrill, 2.44km, left (12 minutes, 29 seconds)
2016-08-13 19:24:15,788 [MoveToMapPokemon] [INFO] [move_to_map_pokemon_move_towards] Moving towards Beedrill, 2.43km, left (12 minutes, 28 seconds)
2016-08-13 19:24:17,984 [MoveToMapPokemon] [INFO] [move_to_map_pokemon_move_towards] Moving towards Beedrill, 2.42km, left (12 minutes, 26 seconds)
2016-08-13 19:24:19,838 [MoveToMapPokemon] [INFO] [move_to_map_pokemon_move_towards] Moving towards Beedrill, 2.41km, left (12 minutes, 24 seconds)
2016-08-13 19:33:51,480 [PokemonGoBot] [INFO] [bot_exit] Exiting bot.
2016-08-13 19:33:51,740 [       cli] [INFO]
2016-08-13 19:33:51,740 [       cli] [INFO] Ran for 0:10:49
2016-08-13 19:33:51,740 [       cli] [INFO] Total XP Earned: 490  Average: 2719.29/h
2016-08-13 19:33:51,740 [       cli] [INFO] Travelled 0.11km
2016-08-13 19:33:51,740 [       cli] [INFO] Visited 1 stops
2016-08-13 19:33:51,740 [       cli] [INFO] Encountered 3 pokemon, 3 caught, 2 released, 0 evolved, 0 never seen before
2016-08-13 19:33:51,742 [       cli] [INFO] Threw 3 pokeballs
2016-08-13 19:33:51,742 [       cli] [INFO] Earned 300 Stardust
2016-08-13 19:33:51,742 [       cli] [INFO]
2016-08-13 19:33:51,742 [       cli] [INFO] Highest CP Pokemon: Dratini [CP: 417] [IV: 15/0/2] Potential: 0.38
2016-08-13 19:33:51,742 [       cli] [INFO] Most Perfect Pokemon: Dratini [CP: 249] [IV: 15/13/15] Potential: 0.96

C:\Users\User\Desktop\Pokemap\PokemonGo-Bot (dev)

@Trico3
Copy link
Author

Trico3 commented Aug 14, 2016

I may have found the reason behind this problem.

after removing the "type": "MoveToMapPokemon", task from the config it seems to be running fine for the past hour now..
It could be that there may be an issue within that task or the fact that I am using a port forwarded host to access the map instead of localhost:5000.

@Trico3
Copy link
Author

Trico3 commented Aug 14, 2016

While having the "type": "MoveToMapPokemon", task active with a non localhost address I do not receive any errors about the bot not being able to access the map, so I am still unsure why the bot would suddenly pause and stop responding

@Trico3
Copy link
Author

Trico3 commented Aug 14, 2016

I believe I have solved the problem by changing the db-type: on the remote computer running the PokemonGo-Map to mysql.

~~My assumption is:
When the bot went full pause mode / non responsive after around every ~15-30 min, it was due to the sqlite reaching it's max connection limit or some other sort of sqlite limit.~~ ~

@k4n30 k4n30 changed the title Bot pauses / gets stuck Bot pauses / gets stuck / SQL remote issue Aug 14, 2016
@k4n30
Copy link
Contributor

k4n30 commented Aug 14, 2016

Too hard to click the close button? :p

@k4n30 k4n30 closed this as completed Aug 14, 2016
@Trico3
Copy link
Author

Trico3 commented Aug 14, 2016

Sorry @k4n30 , it seems that the issue is still there, after another test run it occurred again ~25min mark 😫

@k4n30 k4n30 reopened this Aug 14, 2016
@k4n30
Copy link
Contributor

k4n30 commented Aug 14, 2016

#3918 has a similar issue, Hosting the bot & map on different servers needs to be investigated further

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants