SQL server down = API Call fail #46

Closed
hoeken opened this Issue Mar 25, 2013 · 5 comments

Comments

Projects
None yet
2 participants
Owner

hoeken commented Mar 25, 2013

[2013-03-25 14:51:24,928] ERROR: Unknown API error: No JSON object could be decoded
[2013-03-25 14:51:24,928] ERROR: response: {'status': '200', 'content-length': '105', 'x-powered-by': 'PHP/5.3.10-1ubuntu3.4', 'vary': 'Accept-Encoding', 'server': 'Apache/2.2.22 (Ubuntu)', '-content-encoding': 'gzip', 'date': 'Mon, 25 Mar 2013 06:51:05 GMT', 'content-type': 'text/html'}
[2013-03-25 14:51:24,928] ERROR: content: Failed to connect: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)
[2013-03-25 14:51:24,929] ERROR: No JSON object could be decoded
Traceback (most recent call last):
File "/Users/hoeken/github/BotQueue/bumblebee/botqueueapi.py", line 76, in apiCall
result = json.loads(content)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/init.py", line 326, in loads
return _default_decoder.decode(s)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 360, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 378, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded

Owner

hoeken commented Mar 25, 2013

sql server dying was being caused by nonces clogging up the db (1MM+ records, all useless). still should fix the site to deal with it properly.

Contributor

Jnesselr commented Mar 25, 2013

What are the nonces from? Are they used as authentication? In which case, do they never expire?

Owner

hoeken commented Mar 26, 2013

No, they're used to make sure an API call isn't made twice in a row, and
not even reliably at that. They were killing the site, so I killed them.

On Monday, March 25, 2013, Jnesselr wrote:

What are the nonces from? Are they used as authentication? In which case,
do they never expire?


Reply to this email directly or view it on GitHubhttps://github.com/Hoektronics/BotQueue/issues/46#issuecomment-15400482
.


Zach Hoeken Smith

Work: www.haxlr8r.com
Blog: www.hoektronics.com
Twitter: @hoeken Skype: chilldude22
QQ: 1489598623 China: +86-186-8209-7069

Contributor

Jnesselr commented Mar 26, 2013

What is bad about an API call being made twice in a row? What could be used
to fix it?
On Mar 25, 2013 8:02 PM, "Zach Hoeken" notifications@github.com wrote:

No, they're used to make sure an API call isn't made twice in a row, and
not even reliably at that. They were killing the site, so I killed them.

On Monday, March 25, 2013, Jnesselr wrote:

What are the nonces from? Are they used as authentication? In which
case,
do they never expire?


Reply to this email directly or view it on GitHub<
https://github.com/Hoektronics/BotQueue/issues/46#issuecomment-15400482>
.


Zach Hoeken Smith

Work: www.haxlr8r.com
Blog: www.hoektronics.com
Twitter: @hoeken Skype: chilldude22
QQ: 1489598623 China: +86-186-8209-7069


Reply to this email directly or view it on GitHubhttps://github.com/Hoektronics/BotQueue/issues/46#issuecomment-15435299
.

Owner

hoeken commented Mar 26, 2013

for api reads its not a big deal, for api writes... it could be a problem
(such as if you grab a job twice).

really its not a huge deal, and the api call itself should be smart enough
to handle getting called twice.

alternatively, a faster nonce system using memcache would be the proper
solution. inserting /deleting db records for every api call is ludicrous!
haha.


Zach Hoeken Smith

Work: www.haxlr8r.com
Blog: www.hoektronics.com
Twitter: @hoeken Skype: chilldude22
QQ: 1489598623 China: +86-186-8209-7069

On Tue, Mar 26, 2013 at 9:04 AM, Jnesselr notifications@github.com wrote:

What is bad about an API call being made twice in a row? What could be
used
to fix it?
On Mar 25, 2013 8:02 PM, "Zach Hoeken" notifications@github.com wrote:

No, they're used to make sure an API call isn't made twice in a row, and
not even reliably at that. They were killing the site, so I killed them.

On Monday, March 25, 2013, Jnesselr wrote:

What are the nonces from? Are they used as authentication? In which
case,
do they never expire?


Reply to this email directly or view it on GitHub<
https://github.com/Hoektronics/BotQueue/issues/46#issuecomment-15400482>

.


Zach Hoeken Smith

Work: www.haxlr8r.com
Blog: www.hoektronics.com
Twitter: @hoeken Skype: chilldude22
QQ: 1489598623 China: +86-186-8209-7069


Reply to this email directly or view it on GitHub<
https://github.com/Hoektronics/BotQueue/issues/46#issuecomment-15435299>
.


Reply to this email directly or view it on GitHubhttps://github.com/Hoektronics/BotQueue/issues/46#issuecomment-15435353
.

hoeken closed this in 8eedffa May 25, 2013

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