Build server doesn't handle threads properly
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Python Packager |
Fix Committed
|
Undecided
|
Unassigned |
Bug Description
The build server checks for new jobs every x seconds. It then creates a thread for every build. And when the build's done, that class creates another thread to upload the build.
This is not practical. Often the server'll download 10 jobs, create 10 threads (which maxes out the cpu) and it just locks up due to disk usage. When the builds are done it creates 10 threads to upload to the web server. So 10 ftp connections are created and they try to upload simultaneously. The ftp server often disconnects and the 10 jobs fail.
What should happen:
There are 2 threads. 1 for building, 1 for uploading. There are 2 global stacks. Say 1 called buildQueue, and 1 called uploadQueue. When a job is downloaded from the database, it should get added to buildQueue. When a job's been built and ready to upload, it should be added to uploadQueue.
Changed in python-packager: | |
status: | New → Fix Committed |