Hey all,

I'm currently debugging a Django/Sencha Touch app, and I ran into some 
unexplained JSON errors. They appear to be caused by uwsgi-1.3 (which I just 
installed this morning, upgrading 1.2.x).

The JSON response generated by Django is mangled at seamingly random locations:
$ curl ... | python -msimplejson.tool (a few times)
Unterminated string starting at: line 34665 column 7 (char 916144)
Expecting ',' delimiter: line 12212 column 30 (char 310830)
Expecting ':' delimiter: line 19074 column 5 (char 498939)
Expecting object: line 38517 column 5 (char 1013972)

I've also tried with 1.3-dev which I had lying around, which doesn't have this 
problem.

The JSON, although generated by Django, is always the same. I wrote it to a 
file to test if serving it statically would fix the issue (pinning it down to 
the Python-part of uwsgi), but that also fails: the JSON breaks at random 
locations.

FWIW, this is the INI file I'm using:
-snip-
[uwsgi]
master = 1
; set number of processes and workers
workers = 8
threads = 8
; don't log uwsgi stuff
disable-logging = true
; enable threads and a single interpreter
enable-threads = true
single-interpreter = true
; limit stack size for threads
thread-stacksize = 512
; enable cache
cache = 32
cache-blocksize = 128
; set the http port
http = :8099
; change to django project directory
chdir = server
; add /var/www to the pythonpath, in this way we can use the project.app format
;pythonpath = thirdparty
;pythonpath = ..
; use wsgi file
wsgi-file = wsgi.py
; reload automatically
python-auto-reload = true
; reload when settings.py is touched
touch-reload = settings.py
; configure static map
; static-map = /static=static
static-map = /index.html=../index.html
static-map = /app.json=../app.json
static-map = /app.js=../app.js
static-map = /app=../app
static-map = /touch=../touch
static-map = /resources=../resources
-snip-

And I'm running it on Mac OS X:
ProductName:    Mac OS X
ProductVersion: 10.8.2
BuildVersion:   12C54

-- robert

_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to