Jump to content

Sometimes invalid json-results returned by server


boywhosetsfire

Recommended Posts

boywhosetsfire

Hi,

 

I observed a problem where MB server sporadically returns invalid json data if there are 2 requests in short time. Attached a short Python-testscript (changed file extension to .txt, otherwise upload failed) with which I can reproduce that problem 100% with my database. The script starts 2 threads which both request the same data and write them into files. Sometimes one file is corrupt and the other one is fine, but mostly both files are corrupt. As soon as one of the threads is disabled the result is always fine.

 

During my tests the invalid part in the json-files was always a leading zero somewhere, for example:

 

"CriticRating":037,"OfficialRating":"DE-16"

 

Hopefully any of you guys is able to reproduce it with the testscript. Just the "sectioncontenturl" needs to be updated to your environment. Attached also a zip-file with 2 json-files which the script produced, both are invalid. No server-log attached since it didn't write any output when the data where requested.

 

Server version is "3.0.5363.32049", running on OSX.

json-files.zip

test.txt

Link to comment
Share on other sites

  • 2 weeks later...
boywhosetsfire

Unfortunately there's absolutely nothing visible in the Mediabrowser-logfile when the data are requested. Is there some kind of verbose mode that I could activate?

 

I'm just able to test under OSX. But since no one else seems to report this issue I guess it's a OSX-only problem. If I look at the view posts in the OSX-server-section in the forum I think not really many people are running the server under OSX.

 

In my case this problem always pops up if I'm using XBMC with the XBMB3C-plugin (which I'm also working on). That plugin sends a couple of requests to the MB server when starting XBMC. And I my case then it almost every time fails, since the json-data from the server are corrupt. Temporarily I added some "sleep" to the code so that there's a little delay between the request, then everything works fine. But of course that's not a solution.

Link to comment
Share on other sites

  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...