Hi!
I'm trying to return to user relatively large data, but client (i'm testing
with chrome and telnet) does not receive all the data. Let me show my
config before i continue:
I use PC-BSD 9.0, nginx-1.2.0_1,1 and uwsgi-1.0.4
nginx.conf:
location /test/ {
uwsgi_pass unix:///tmp/uwsgi.sock;
include uwsgi_params;
uwsgi_param SCRIPT_NAME /test;
uwsgi_modifier1 30;
uwsgi_param UWSGI_SCRIPT app;
uwsgi_param UWSGI_CHDIR /usr/local/www/test;
}
uwsgi.ini:
[uwsgi]
socket = /tmp/uwsgi.sock
process = 1
master = true
;workers = 10
async = 10
;ugreen = true
uid = 80
gid = 80
daemonize = /var/log/www/uwsgi.log
pidfile = /var/run/uwsgi.pid
touch-reload = /usr/local/www/test/app.py
app.py:
def application(environ, start_response):
CHUNK_SIZE = 1024
start_response("200 OK", [('Content-type', "text/plain")])
data = str(range(2**15))
for d in [data[i: i + CHUNK_SIZE] for i in range(0, len(data),
CHUNK_SIZE)]:
yield d
Now, in telnet i typed:
GET /test/ HTTP/1.1
Host: localhost
Result was returned in 5 chunks with lengths: 0xfd3, 0x1000, 0x2000, 0x1000
and 0x1cc7
And here is last 10 lines of output in my terminal:
[output]
909, 16910, 16911, 16912, 16913, 16914, 16915, 16916, 16917, 16918, 16919,
16920, 16921, 16922, 16923, 16924, 16925, 16926, 16927, 16928, 16929,
16930, 16931, 16932, 16933, 16934, 16935, 16936, 16937, 16938, 16939,
16940, 16941, 16942, 1
6943, 16944, 16945, 16946, 16947, 16948, 16949, 16950, 16951, 16952, 16953,
16954, 16955, 16956, 16957, 16958, 16959, 16960, 16961, 16962, 16963,
16964, 16965, 16966, 16967, 16968, 16969, 16970, 16971, 16972, 16973,
16974, 16975, 16976,
16977, 16978, 16979, 16980, 16981, 16982, 16983, 16984, 16985, 16986,
16987, 16988, 16989, 16990, 16991, 16992, 16993, 16994, 16995, 16996,
16997, 16998, 16999, 17000, 17001, 17002, 17003, 17004, 17005, 17006,
17007, 17008, 17009, 17010,
17011, 17012, 17013, 17014, 17015, 17016, 17017, 17018, 17019, 17020,
17021, 17022, 17023, 17024, 17025, 17026, 17027, 17028, 17029, 17030,
17031, 17032, 17033, 17034, 17035, 17036, 17037, 17038, 17039, 17040,
17041, 17042, 17043, 17044
, 17045, 17046, 17047, 17048, 17049, 17050, 17051, 17052, 17053, 17054,
17055, 17056, 17057, 17058, 17059, 17060, 17061, 17062, 17063, 17064,
17065, 17066, 17067, 17068, 17069, 17070, 17071, 17072, 17073, 17074,
17075, 17076, 17077, 1707
8, 17079, 17080, 17081, 17082, 17083, 17084, 17085, 17086, 17087, 17088,
17089, 17090, 17091, 17092, 17 32746, 32747, 32748, 32749, 32750, 32751,
32752, 32753, 32754, 32755, 32756, 32757, 32758, 32759, 32760, 32761,
32762, 32763, 32764,
32765, 32766, 32767]
0
Connection closed by foreign host.
[/output]
So, as you can see, content between 17092 and 32746 is lost.
Also i have bunch of identical lines in uwsgi.log:
write(): Resource temporarily unavailable [proto/uwsgi.c line 138] during
GET /test/ (127.0.0.1)
I also tried same nginx.conf & uwsgi.ini & app.py on FreeBSD 8.2 with
nginx-1.0.14,1 & uwsgi-1.0.1 and nginx-1.2.0_1,1 & uwsgi-1.0.4. Outcome is
the same: chunks are different every time, but always truncated.
Is there something wrong with my config?
Thanks!
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi