Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fast-listen equivalent on with WSGI server #416

Closed
zopyx opened this issue Dec 11, 2018 · 7 comments
Closed

fast-listen equivalent on with WSGI server #416

zopyx opened this issue Dec 11, 2018 · 7 comments

Comments

@zopyx
Copy link
Member

zopyx commented Dec 11, 2018

In Zope 2 it was possible open to the listener port early instead of the end of the startup phase. It might be controversial if this is a good thing or not - at least it is convenient during the development phase when you start up an instance that might take some time (e.g. Plone with many add-ons) and start the first request (and do something different inbetween until Plone renders the first page). Is there something similar doable with the WSGI server?

@icemac icemac added this to the 4.0 final milestone Dec 18, 2018
@icemac
Copy link
Member

icemac commented Dec 18, 2018

It seems to be a good idea but I even did not know about this feature in Zope 2.

@icemac
Copy link
Member

icemac commented Feb 27, 2019

This feature request also exists in plone/plone.recipe.zope2instance#71. @pbauer says there: it has to be supported by the WSGI server and that waitress does not support this feature.

@dataflake
Copy link
Member

@zopyx It is doable and appears to have been implemented in the latest release of plone.recipe.zope2instance after plone/plone.recipe.zope2instance#75 was merged. Can you try that?

@zopyx
Copy link
Member Author

zopyx commented Apr 17, 2019

Working but buggy

plone/plone.recipe.zope2instance#86

@dataflake
Copy link
Member

plone.recipe.zope2instance will be fixed when plone/plone.recipe.zope2instance#94 is merged in.

As far as the original question goes: waitress itself does not have a direct configuration option for this behavior. Philipp was right on that. But waitress allows you to hand it a socket that you can create manually beforehand instead of specifying a host and port, and that's what plone.recipe.zope2instance does:

https://github.com/plone/plone.recipe.zope2instance/blob/22bbaf3613d0552c1c42d5c93480434e6e8e0751/src/plone/recipe/zope2instance/ctl.py#L903-918

The code in Zope2.Startup.serve.py, ServeCommand.run would have to emulate that.

@dataflake
Copy link
Member

The feature is completed and released in plone.recipe.zope2instance, which is what every single Plone user and developer will most likely be using, which will thus cover Andreas.

@icemac Emulating this functionality in Zope2.Startup.serve.py seems like a bad idea because it would only work for waitress. The built-in server runner in Zope should stay as agnostic as possible.

I suggest closing this issue here.

@icemac
Copy link
Member

icemac commented Apr 30, 2019

@dataflake I second keeping Zope agnostic to the WSGI server.

@icemac icemac closed this as completed Apr 30, 2019
@icemac icemac added the invalid label Apr 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants