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

Devstack doesn't use gunicorn #92

Open
2 tasks
timmc-edx opened this issue Dec 9, 2024 · 5 comments
Open
2 tasks

Devstack doesn't use gunicorn #92

timmc-edx opened this issue Dec 9, 2024 · 5 comments

Comments

@timmc-edx
Copy link
Member

timmc-edx commented Dec 9, 2024

Unlike 2U's deployed environments, devstack uses Django's runserver command instead of gunicorn.

A/C:

  • If feasible, switch devstack to use gunicorn
  • If not, add docs on how to use gunicorn when desired, and why it's not the default

Notes:

  • edx-platform's lms/docker_lms_gunicorn.py has a hardcoded workers = 17 which may not be appropriate for devstack. We may just be able to change it, depending on what actually uses this file these days.
  • Can we still get autoreloading with gunicorn?
@timmc-edx timmc-edx converted this from a draft issue Dec 9, 2024
@robrap robrap removed the status in Arch-BOM Dec 9, 2024
@jristau1984 jristau1984 moved this to Backlog in Arch-BOM Dec 9, 2024
@robrap
Copy link

robrap commented Jan 29, 2025

@timmc-edx: I know you've been experimenting with gunicorn in devstack. What's the status of that? Are there temporary docs for that that would be used as part of this ticket? Is there anything you could add as a comment here? Thank you.

@timmc-edx
Copy link
Member Author

For the new codejail service, I'm fairly sure I could just switch over the Dockerfile to just use gunicorn for both the dev and prod targets. It should just work. However, I think the main limiting factor is that runserver gives us auto-reloading when code changes on disk, and gunicorn doesn't, out of the box. So that's probably the main thing to look into.

@robrap
Copy link

robrap commented Jan 29, 2025

Thanks @timmc-edx. That is partially answering my question about what is different about with and without gunicorn, but I wasn't actually asking about codejail. I was asking because there is another issue in DD in the LMS that may require local testing with gunicorn, and I wanted to link to a document for that setup.

@timmc-edx
Copy link
Member Author

Yeah, but that's the service I happen to know about. :-) I thought you were asking about why we couldn't switch over all services in devstack.

As for local testing with gunicorn in the LMS, I recommend e93d674 which is on the timmc/lms-gunicorn branch, itself based on the local-devstack branch. I don't have a proper document for it.

@robrap
Copy link

robrap commented Jan 29, 2025

Right. This ticket is for docs, so it is ok that there aren’t any. Your link to the commit is great. If you have any other rough notes/thoughts that would be useful for someone else to pick this up, just add an additional comment on this ticket. Either way, this is great. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog
Development

No branches or pull requests

2 participants