KgBC / just-dice-bot

Hi, this is a flexible betting bot for just-dice.com. Feel free to use it under GPL. If you want to donate some Beer/Satoshis: 1CDjWb7zupTfQihc6sMeDvPmUHkfeMhC83 Thanks. The ACES branch is considered stable, use this if you don't want to develop and do not need latest features: https://github.com/KgBC/just-dice-bot/tree/aces
GNU General Public License v2.0
18 stars 6 forks source link

Exception [Errno 122] Disk quota exceeded: 'bets.png', retrying... #36

Open fq8xkzb9ee opened 10 years ago

fq8xkzb9ee commented 10 years ago

Traceback (most recent call last): File "just-dice-bot.py", line 676, in init canvas.print_figure(graph_fn) File "/usr/lib/pymodules/python2.7/matplotlib/backend_bases.py", line 2021, in print_figure **kwargs) File "/usr/lib/pymodules/python2.7/matplotlib/backends/backend_agg.py", line 474, in print_png filename_or_obj = file(filename_or_obj, 'wb') IOError: [Errno 122] Disk quota exceeded: 'bets.png'

running in a 2GB RAM VPS with 100GB of disk.

output of df: Filesystem 1K-blocks Used Available Use% Mounted on /dev/simfs 104857600 6949216 97908384 7% / none 1048576 4 1048572 1% /dev none 209716 1080 208636 1% /run none 5120 0 5120 0% /run/lock none 1048576 0 1048576 0% /run/shm none 102400 0 102400 0% /run/user

fq8xkzb9ee commented 10 years ago

most recent startup: Simple martingale bot for just-dice.com Copyright (C) 2013 KgBC IFGIWg@tormail.org under GPLv2 (see source)

News/new versions see https://github.com/KgBC/just-dice-bot

########## playing on just-dice.com with real btc ##########

Set up selenium (this will take a while, be patient) ... Traceback (most recent call last): File "just-dice-bot.py", line 958, in JustDiceBet() File "just-dice-bot.py", line 490, in init self.setUp() File "just-dice-bot.py", line 839, in setUp self.remote_impl.setUp(self.visible, self.user, self.password) File "just-dice-bot.py", line 106, in setUp self.driver = webdriver.Firefox() File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/firefox/webdriver.py", line 44, in init self.profile = FirefoxProfile() File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/firefox/firefox_profile.py", line 111, in init self.profile_dir = self._create_tempfolder() File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/firefox/firefox_profile.py", line 270, in _create_tempfolder return tempfile.mkdtemp() File "/usr/lib/python2.7/tempfile.py", line 325, in mkdtemp _os.mkdir(file, 0700) OSError: [Errno 122] Disk quota exceeded: '/tmp/tmpdcVnWP'

did a rm -rf * in /tmp, and everything starting up fine now. does just-dice-bot clean up after itself, or is something else crapping all over /tmp?

KgBC commented 10 years ago

The bot leaves logs and graph pictures in the app directory, and keeps a database (sqlite) with running bets. Database is deleted and recreated when the bot is started. Plus Selenium creates an empty profile for firefox. Think this selenium profile could be in /tmp according to the log which uses tempfile.mkdtemp().

So if you are really low on disk space this could be an issue :)

I already added an option in the latest release (just here on my laptop for some days of testing) where you could set the path to a custom firefox profile, this could help as you could decide where it should be. If needed I could also implement an switch to disable logging and/or graphing+database.

So - is this your feature request?