{"id":132,"date":"2011-11-07T15:23:02","date_gmt":"2011-11-07T14:23:02","guid":{"rendered":"http:\/\/blog.freesound.org\/?p=132"},"modified":"2011-11-07T15:23:02","modified_gmt":"2011-11-07T14:23:02","slug":"some-good-news","status":"publish","type":"post","link":"https:\/\/blog.freesound.org\/?p=132","title":{"rendered":"some good news :)"},"content":{"rendered":"<p>Hi all,<\/p>\n<p>Freesound has been struggling to regain stability over the last few weeks but we are happy to announce that we finally made it:) The problems started about a month ago when we realized our DB configuration was completely wrong for our hardware and the kind of traffic we are serving. After fiddling around with it we settled for a setup that seemed to work OK. Even so, problems didn&#8217;t stop with the sounds page 404ing at times, resulting in the whole site 404ing. We&#8217;ve finally pinned this down to some horribly constructed queries our Django ORM was doing for us&#8230;<\/p>\n<p>After we rewrote those queries the load average of the DB server was reduced dramatically as you can see from this beautiful Munin graph which shows the load average before (pre 18:00) and after (post 18:00) we deployed the version with the fixed queries \ud83d\ude42<\/p>\n<p><a href=\"http:\/\/blog.freesound.org\/wp-content\/uploads\/2011\/11\/load-day.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-138\" title=\"load-day\" src=\"http:\/\/blog.freesound.org\/wp-content\/uploads\/2011\/11\/load-day.png\" alt=\"DB load average\" width=\"497\" height=\"280\" srcset=\"https:\/\/blog.freesound.org\/wp-content\/uploads\/2011\/11\/load-day.png 497w, https:\/\/blog.freesound.org\/wp-content\/uploads\/2011\/11\/load-day-300x169.png 300w\" sizes=\"auto, (max-width: 497px) 100vw, 497px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>Essentially these changes made the site more stable but our problems were far from over. Load average on our webserver machine was off the roof, making impossible for any sane sysadmin to sleep&#8230; While checking web servers logs we found repeated error of broken connections&#8230; This time the culprit seemed to be the <a href=\"http:\/\/trac.saddi.com\/flup\" target=\"_blank\">flup<\/a> module that <a href=\"https:\/\/www.djangoproject.com\/\" target=\"_blank\">Django<\/a> uses by default to serve fastcgi. All efforts to isolate this problem proved fruitless and we finally decided to ditch flup and move to <a href=\"http:\/\/gunicorn.org\/\" target=\"_blank\">Gunicorn<\/a> which in general is a good idea concerning how things are moving in the Python world. After a period of testing we deployed to production the 3rd of November and are happy to announce that the results are really good! Have a look at the graph below. Load has dropped from peaking at 11! to peaking at 4! and being most of the time at around 1. Which is expected and acceptable for the limited hardware we are running on.<\/p>\n<p><a href=\"http:\/\/blog.freesound.org\/wp-content\/uploads\/2011\/11\/tabasco_load_average.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-139\" title=\"tabasco_load_average\" src=\"http:\/\/blog.freesound.org\/wp-content\/uploads\/2011\/11\/tabasco_load_average.png\" alt=\"\" width=\"497\" height=\"280\" srcset=\"https:\/\/blog.freesound.org\/wp-content\/uploads\/2011\/11\/tabasco_load_average.png 497w, https:\/\/blog.freesound.org\/wp-content\/uploads\/2011\/11\/tabasco_load_average-300x169.png 300w\" sizes=\"auto, (max-width: 497px) 100vw, 497px\" \/><\/a><\/p>\n<p>So sorry for the long technical post but we really felt we had to give an explanation for the poor service you&#8217;ve seen lately. With this stability we&#8217;re back at working on application bugs and even better new features \ud83d\ude42<\/p>\n<p>Thanks<\/p>\n<p>Stelios<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hi all, Freesound has been struggling to regain stability over the last few weeks but we are happy to announce that we finally made it:) The problems started about a month ago when we realized our DB configuration was completely &hellip; <a href=\"https:\/\/blog.freesound.org\/?p=132\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":7,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-132","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blog.freesound.org\/index.php?rest_route=\/wp\/v2\/posts\/132","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.freesound.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.freesound.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.freesound.org\/index.php?rest_route=\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.freesound.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=132"}],"version-history":[{"count":2,"href":"https:\/\/blog.freesound.org\/index.php?rest_route=\/wp\/v2\/posts\/132\/revisions"}],"predecessor-version":[{"id":143,"href":"https:\/\/blog.freesound.org\/index.php?rest_route=\/wp\/v2\/posts\/132\/revisions\/143"}],"wp:attachment":[{"href":"https:\/\/blog.freesound.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=132"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.freesound.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=132"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.freesound.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=132"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}