On Wed, Mar 2, 2011 at 11:56 AM, Roberto De Ioris <[email protected]> wrote: > > Il giorno 02/mar/2011, alle ore 11.46, luigi scarso ha scritto: > >> On Wed, Mar 2, 2011 at 11:18 AM, Roberto De Ioris <[email protected]> wrote: >>> >>> Il giorno 02/mar/2011, alle ore 10.46, luigi scarso ha scritto: >>> >>>> On Wed, Mar 2, 2011 at 8:54 AM, Roberto De Ioris <[email protected]> wrote: >>>>> This should be fixed now >>>> hm, no, but I'm not able to track down the culprit >>>> >>>> I think it's related with this : >>>> env1 = {} >>>> env1['TEST'] = '\x00aaa'*10000 >>>> uwsgi.erlang_send_message(uwsgi_erlang, qs["process"][0], >>>> tuple(env1.items()) ) >>>> for j in uwsgi.erlang_recv_message(uwsgi_erlang): >>>> yield str(j) + '\n' >>>> uwsgi.erlang_close(uwsgi_erlang) >>>> return >>>> >>> >>> >>> That's fun, ei_x_encode_string will stop if it found a non printable char. >>> >>> I have substituted it with ei_x_encode_binary >> hm no effect >> [pid: 10132|app: 0|req: 1/1] 192.168.2.27 () {30 vars in 496 bytes} >> [Wed Mar 2 11:45:17 2011] GET >> /erlang?sname=uwsgierlang@johnII&process=echoer => generated 18 bytes >> in 1 msecs (HTTP/1.1 200) 1 headers in 45 bytes (1 switches on core 0) >> >> and still timeout. > > > > This is the python app i am using: > > import uwsgi > > > def application(env, sr): > > env1 = {} > env1['TEST'] = '\x00aaa'*10000 > > sr('200 OK', [('Content-Type','text/html')]) > > uwsgi_erlang = uwsgi.erlang_connect("erlo@fiorenzo") > > uwsgi.erlang_send_message(uwsgi_erlang, "echo", > (("1","goo",u"ciao"),("2","coo"),tuple(env1.items()))) > > for i in uwsgi.erlang_recv_message(uwsgi_erlang): > yield str(i) > > uwsgi.erlang_close(uwsgi_erlang) > > > and this is the erlang module > > -module(echo). > > > -export([start/0, loop/0]). > > > > > loop() -> > receive > Msg -> > io:write("ciao~n"), > io:format("~w~n", [Msg]), > { pippo, 'uwsgi@maverick64' } ! {Msg, whereis(echo)}, > loop() > end. > > start() -> > register(echo, spawn(echo, loop, [])), > ok. > > The same works if i directly use a string instead of uple(env1.items()) right -- me stupid, I was using the previous pyerl plugin.
Now with env1['TEST'] = 'aaa'*10000 the client readly print many 'aaa', but then it goes in timeout. With env1['TEST'] = 'aaa'*10 the client goes in timeout and doesn't print anything. -- luigi _______________________________________________ uWSGI mailing list [email protected] http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
