librelist archives

« back to archive

two instances on two ports

two instances on two ports

From:
Robert Voigtländer
Date:
2013-12-19 @ 19:56
Hi,

I use this example http://flask.pocoo.org/snippets/116/ for flask with sse
without blocking.
It works great. I now want to use pypy. Unfortunetly gevent fires errors
under pypy.

So I thought I might be able to go without gevent. So I need to split the
event stream part into a separate thread to not block the main server.
The second flask instance might/can run on a second port.

I configured two instances with different ports and ran them in seperate
threads. The instance started first responds, the second doesn't.

- What is the correct way to run two instances?
- Or is there another way to go async without gevent?

Thanks
Robert

Re: [flask] two instances on two ports

From:
Nic Lorenzen
Date:
2013-12-20 @ 11:51
Robert,

Maybe the issue is related to the special steps needed to configure gevent
with pypy:
http://morepypy.blogspot.com/2013/04/pypy-20-beta-2-released.html?m=1
?
 On Dec 19, 2013 2:58 PM, "Robert Voigtländer" <r.voigtlaender@gmail.com>
wrote:

> Hi,
>
> I use this example http://flask.pocoo.org/snippets/116/ for flask with
> sse without blocking.
> It works great. I now want to use pypy. Unfortunetly gevent fires errors
> under pypy.
>
> So I thought I might be able to go without gevent. So I need to split the
> event stream part into a separate thread to not block the main server.
> The second flask instance might/can run on a second port.
>
> I configured two instances with different ports and ran them in seperate
> threads. The instance started first responds, the second doesn't.
>
> - What is the correct way to run two instances?
> - Or is there another way to go async without gevent?
>
> Thanks
> Robert
>