Il giorno 01/ott/2012, alle ore 14:39, Robert Klep <[email protected]> ha 
scritto:

> Robert Klep <[email protected]> wrote on Mon Oct 01 2012 at 12:50:45:
>> 
>> 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.
> 
> Simplest test-case which fails:
> $ uwsgi --http :8099 --static-map /=file.json
> 
> Forgot to mention file size earlier:
> $ ls -al file.json 
> -rw-rw-r-- 1 robert wheel 1148108 Oct  1 12:45 file.json
> 
> The returned data size varies:
> $ curl -s http://localhost:8099 | wc -c
> 1121004
> $ curl -s http://localhost:8099 | wc -c
> 1108560
> $ curl -s http://localhost:8099 | wc -c
> 1060448
> $ curl -s http://localhost:8099 | wc -c
> 1103944
> $ curl -s http://localhost:8099 | wc -c
> 1120380
> $ curl -s http://localhost:8099 | wc -c
>  949960
> 
> These are the uwsgi startup messages:
> [uwsgi-static] added mapping for / => x.json
> *** Starting uWSGI 1.3 (64bit) on [Mon Oct  1 14:33:39 2012] ***
> compiled with version: 4.2.1 Compatible Apple Clang 4.1 
> ((tags/Apple/clang-421.11.65)) on 01 October 2012 11:54:02
> os: Darwin-12.2.0 Darwin Kernel Version 12.2.0: Sat Aug 25 00:48:52 PDT 2012; 
> root:xnu-2050.18.24~1/RELEASE_X86_64
> nodename: mb
> machine: x86_64
> clock source: unix
> detected number of CPU cores: 8
> current working directory: 
> /Users/robert/Devel/SenchaTouch/BioGids-2.1.0b3/resources
> detected binary path: /usr/bin/uwsgi
> *** WARNING: you are running uWSGI without its master process manager ***
> your processes number limit is 709
> your memory page size is 4096 bytes
> building mime-types dictionary from file /etc/mime.types...901 entry found
> detected max file descriptor number: 256
> lock engine: OSX spinlocks
> uWSGI http bound on :8099 fd 4
> spawned uWSGI http 1 (pid: 94250)
> uwsgi socket 0 bound to TCP address 127.0.0.1:57862 (port auto-assigned) fd 3
> Python version: 2.7.2 (default, Jun 20 2012, 16:23:33)  [GCC 4.2.1 Compatible 
> Apple Clang 4.0 (tags/Apple/clang-418.0.60)]
> *** Python threads support is disabled. You can enable it with 
> --enable-threads ***
> Python main interpreter initialized at 0x7fe06241a1f0
> your server socket listen backlog is limited to 100 connections
> mapped 72344 bytes (70 KB) for 1 cores
> *** Operational MODE: single process ***
> *** no app loaded. going in full dynamic mode ***
> *** uWSGI is running in multiple interpreter mode ***
> spawned uWSGI worker 1 (and the only) (pid: 94249, cores: 1)
> [pid: 94249|app: -1|req: -1/1] 127.0.0.1 () {28 vars in 301 bytes} [Mon Oct  
> 1 14:33:49 2012] GET / => generated 1148108 bytes in 1 msecs via sendfile() 
> (HTTP/1.0 200) 3 headers in 122 bytes (0 switches on core 0)
> [pid: 94249|app: -1|req: -1/2] 127.0.0.1 () {28 vars in 301 bytes} [Mon Oct  
> 1 14:34:04 2012] GET / => generated 1148108 bytes in 2 msecs via sendfile() 
> (HTTP/1.0 200) 3 headers in 122 bytes (0 switches on core 0)
> [pid: 94249|app: -1|req: -1/3] 127.0.0.1 () {28 vars in 301 bytes} [Mon Oct  
> 1 14:34:05 2012] GET / => generated 1148108 bytes in 1 msecs via sendfile() 
> (HTTP/1.0 200) 3 headers in 122 bytes (0 switches on core 0)
> [pid: 94249|app: -1|req: -1/4] 127.0.0.1 () {28 vars in 301 bytes} [Mon Oct  
> 1 14:34:06 2012] GET / => generated 1148108 bytes in 1 msecs via sendfile() 
> (HTTP/1.0 200) 3 headers in 122 bytes (0 switches on core 0)
> [pid: 94249|app: -1|req: -1/5] 127.0.0.1 () {28 vars in 301 bytes} [Mon Oct  
> 1 14:34:07 2012] GET / => generated 1148108 bytes in 1 msecs via sendfile() 
> (HTTP/1.0 200) 3 headers in 122 bytes (0 switches on core 0)
> 
> 


Can you check if all of the 'broken' requests are served via 'sendfile()' (it 
is reported in the logs, so you should re-enable them)

Thanks

--
Roberto De Ioris
http://unbit.it
JID: [email protected]

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

Reply via email to