Page 6 of 6

Re: NES Cart DB down again

Posted: Tue Jan 17, 2017 7:13 am
by FitzRoy
I'm curious to know the status of the as yet undumped list of Famicom carts. There doesn't seem to be much progress on getting those bought and dumped? Are they too expensive or something?

Re: NES Cart DB down again

Posted: Mon Mar 06, 2017 4:19 pm
by Myask
I assume it's still volunteer ad-hoc community work, and we haven't got a member in Japan with money to burn, motivation, and equipment.

Re: NES Cart DB down again

Posted: Sat Apr 01, 2017 3:56 pm
by tepples
Down again, with "access denied" all over the place.

Re: NES Cart DB down again

Posted: Sat Apr 01, 2017 8:09 pm
by Myask
tepples wrote:Down again, with "access denied" all over the place.
WFM

Re: NES Cart DB down again

Posted: Sun Apr 02, 2017 7:43 am
by Revenant
Seems fine on my end as well. Maybe it was just being a little sporadic earlier?

Re: NES Cart DB down again

Posted: Mon Apr 03, 2017 9:09 am
by tepples
tepples wrote:Down again, with "access denied" all over the place.
It was reported to me, through a channel that I don't remember with certainty but was most probably #nesdev on EFnet, that NesCartDB was broken. I checked it out, and the site was having issues with its MySQL database: the application server was getting "access denied" from the database server when trying to SELECT from various tables. It appeared as "access denied" because the application server was set up to echo PHP warning messages to output instead of logging them privately or converting them to exceptions. This problem was present at the time I posted the previous comment but has since cleared up.

Re: NES Cart DB down again

Posted: Mon Apr 03, 2017 5:24 pm
by BootGod
FitzRoy wrote:I'm curious to know the status of the as yet undumped list of Famicom carts. There doesn't seem to be much progress on getting those bought and dumped? Are they too expensive or something?
It's mostly a money thing for me, I don't have quite as much disposable income as I used too. Also, when I first started dumping FC stuff, I was buying large bulk lots for very cheap, at this point I pretty much have to get them individually which adds up quick.
tepples wrote:Down again, with "access denied" all over the place.
I'm aware this happens occasionally, I think it has something with concurrent connections to DB being maxed out because for some reason some sessions aren't closing properly. The problem fixes itself when the rouge sessions timeout. Could anyone who has experienced this error tell me how long the problem persisted?

Re: NES Cart DB down again

Posted: Mon Apr 03, 2017 5:41 pm
by tepples
BootGod wrote:
tepples wrote:Down again, with "access denied" all over the place.
I'm aware this happens occasionally, I think it has something with concurrent connections to DB being maxed out because for some reason some sessions aren't closing properly. The problem fixes itself when the rouge sessions timeout. Could anyone who has experienced this error tell me how long the problem persisted?
Here are a couple things you can try to make these problems occur less often.

Nowadays it's best practice to convert all PHP warnings to ErrorException:

Code: Select all

function exception_error_handler($severity, $message, $file, $line) {
  if (error_reporting() & $severity) {
    throw new ErrorException($message, 0, $severity, $file, $line);
  }
}
set_error_handler("exception_error_handler");
This way, failed connections will cause errors that you can catch. Failing fast reduces how much load a failed connection puts on the database before it times out.

Another is testing the database connection before trying to render anything. Often you can test the connection by trying a simple query that should always work, such as looking up global settings for the application or data associated with a user session. If this fails, raise an appropriate HTTP status code such as 503 Service Unavailable. More generally, getting in the habit of doing all the database access before producing any output will help you separate functions that access data from functions that render it for display, which can make the architecture cleaner and easier to maintain.

Re: NES Cart DB down again

Posted: Thu Aug 24, 2017 4:56 pm
by tepples
Discuss the latest downtime in #16325