/srv/irclogs.ubuntu.com/2012/03/26/#ubuntu-website.txt

=== Amoz is now known as afougner
cjohnstonuh oh13:55
newz2000hey mhall119, cjohnston13:55
cjohnstonnewz2000: as it is I have setup my own box for it.13:55
mhall119hey newz200013:55
newz2000mhall119: cjohnston was asking if I can help escalate his RT for staging of summit and loco13:56
newz2000he says he wants to be able to update packages13:56
newz2000(I can certainly relate to that)13:56
newz2000I don't think it's going to happen though, but I have an idea13:56
newz2000mhall119: this year we started doing something new, have you used razorgirl?13:56
mhall119newz2000: no, I never used it13:57
nigelbI'm curious what it is.13:57
* mhall119 feels like I should call it 'her'13:58
newz2000ok, hold time, getting hit from 3 sides now13:58
cjohnstonwe hit hardest13:58
mhall119cjohnston: no we don't13:59
mhall119trust me14:00
cjohnstonsshhh14:00
newz2000mhall119, cjohnston: ok, here's the story14:02
newz2000razorgirl is a pretty stock jenkins, but with bzr and irc modules installed (and SSO login support)14:02
newz2000we have made it into pretty much a one-step command to get a new canonistack instance set up and running our app. It's purely scripted.14:02
newz2000mhall119 can set up a canonistack and he can look at the code for sizzle/fenchurch to see how we do the bootstrapping14:03
mhall119assuming canonistack is working14:03
newz2000well, that's why it's a one-step command to bootstrap, right? :-)14:03
mhall119we actually have a juju charm for summit14:03
mhall119or the start of one anyway14:03
newz2000ok, cool. That will work.14:03
cjohnstonblah14:03
newz2000Then we use jenkins to poll the bzr branch every 5 min and when it changes, update the canonistack install.14:04
newz2000with the irc plugin we can trigger builds manually in IRC14:04
newz2000and when something interesting happens the bot notifies us.14:04
cjohnstonsounds cool14:04
nigelbnewz2000: wow. that is cool.14:04
newz2000you can count on canonistack going down every week (Mondays about right now) so simple bootstrapping is the key.14:05
newz2000no RT needed. Though you do have to be luck enough to get a public IP address. ;-)14:06
mhall119are they still running out of public addresses?14:07
newz2000yes, but I have two at the moment and will release one today so at least one will be available soon.14:07
newz2000and the last e-mail then sent indicated they're working on a solution to that.14:07
newz2000mhall119: if you can't use razorgirl then you might want to isntall jenkins on cjohnston's box. It is a very easy install, though I'd suggest having 1G of ram.14:08
cjohnstonnewz2000: got a CC for me?14:08
newz2000I would not put that on canonistack14:08
newz2000cjohnston: a cc on what?14:08
cjohnston;-)14:08
cjohnstonCredit Card14:08
newz2000ah, no14:08
newz2000:-)14:08
newz2000maybe the guys at lulzsec can hook you up with one14:09
cjohnstonI dont know who that is14:09
newz2000the renegade black-hat hackers who split off from anonymous14:10
cjohnstonheh14:10
mhall119I think nigelb was going to get us a jenkins instance14:10
newz2000heck, they can probable give you mine14:10
mhall119newz2000: aren't they also the ones getting themselves arrested and installing virus-infested software on their own machines?14:11
newz2000yeah, true14:11
afougnerlulzsec are the trolls of "hacking"14:11
* mhall119 has no respect for a 'hacker' that will install and run an unsigned binary on their own machine14:11
=== afougner is now known as Amoz
Amozcjohnston, how's the form stuff going?14:12
Amozbtw, razorgirl sounds cool14:12
cjohnstonAmoz: nothing has happened since we talked yesterday14:13
Amozk14:13
Amozmhall119, for a django dev server, what webserver would you recommend ?14:16
cjohnstonwe use apache14:17
cjohnstonpeople do use ngnix14:17
mhall119Amoz: once you're going to django/python, the webserver itself doesn't make a whole lot of difference14:19
mhall119newz2000 might have some more insight into that, he did some optimization testing on apache awhile back14:20
nigelbI've found apache works better than anything else.14:20
Amozmhall119, apache it is then, I'm struggling though14:24
mhall119Amoz: is this for local dev?14:27
cjohnstonnigelb: could you fire off a tarmac please14:27
cjohnstonmhall119: its on his box.. he wants to be able to leave it runnign14:27
mhall119oh, ok14:27
AmozI get an operationalError exception14:28
Amozunable to open database file14:28
Amozanyone seen that before?14:29
AmozOH wait14:29
Amozlocal_settings contains the database info14:29
Amozis that automatically recognized by the .wsgi thingy?14:30
Amozprobably is...14:32
newz2000Amoz: the diff between apache and nginx is that apache comes pre-configured to work in common situations, that means stuff you don't need is turned on by default14:35
newz2000Once I tweaked apache I found no appreciable diff in performance between it and nginx14:35
newz2000so pick which ever you're most comfortable with or most likely to get help with14:35
Amoznewz2000, that's true14:36
Amozapache is stable as a horse14:36
Amoza little hungry for memory on a 256MB VPS though14:36
cjohnston]/314:37
cjohnstonuggh14:37
newz2000Amoz: yes, let me get you some commands to help you configure apache14:38
newz2000just a min14:38
Amoznewz2000, I think it's pretty much config14:38
Amozd14:38
AmozI can see the django debug page14:38
Amoznewz2000, http://amoz.dyndns.org:8080/14:39
Amozthere14:39
newz2000Amoz: here's what I do to get the best performance, considering your low mem I might go a step further though, but hold tight, one thing at a time:14:40
newz2000sudo a2dismod \*14:40
newz2000sudo a2enmod alias authn_file authz_host cgid deflate env mime reqtimeout rewrite setenvif ssl wsgi14:40
newz2000sudo service apache2 restart14:40
newz2000I would do that, also reduce the number of apache children to two or three, make sure you have an Alias set up for your static files14:40
newz2000turn off debug, make sure your e-mail is in settings.py so you get e-mails if there is a 500 error14:40
newz2000if that doesn't work, then you can consider these two options:14:41
newz2000put your apache on a high port and put squid or nginx on 80 and set them to be caching proxies with a time-out of 2 seconds.14:41
newz2000or switch to fastcgi (either with apache or nginx, though probably now you're in the territory where nginx will shine)14:42
Amozmy god newz2000 hold it!14:42
Amoz:D14:42
AmozI'm not on a 256MB now14:42
Amozbut thanks anyway14:42
newz2000oh14:42
newz2000:-)14:42
newz2000Well, you can still try that stuff out. ;-)14:42
Amozif I'm bored this friday, I will ;)14:43
newz2000Def do the first things I suggestd then. a2dismod/a2enmod14:43
newz2000that made a big diff even on ec2s with plenty of ram14:43
AmozI can do that later if I find memory low14:43
Amozright now I've got > 2GB cached14:44
Amozso mem is fine :P14:44
newz2000no, not for memeory usage14:44
Amozoh14:44
newz2000that increased the number of req/sec big time14:44
newz2000that code that is enabled all runs in apache so get it out of there and you get more cpu14:44
newz2000and if you don't need rewrite or ssl get rid of them too, rewrite alone makes a huge impact14:45
Amozah, I always have it enabled anyway14:45
newz2000I'd wished we could have gotten apache 2.4 in precise. rewrite is far less likely to be needed.14:46
newz2000but c'est la vie14:47
Amozapache 2.4 sounds awesome14:48
Amozits footprint is much smaller now OOTB , right?14:48
newz2000That's what they say, but I haven't tried it.14:50
newz2000I have a close friend who is an apache wizard and is always running the latest code.14:51
Amozwow14:51
Amozwizard14:51
Amozso anyone able to see what's going on here? http://amoz.dyndns.org:8080/14:55
AmozI did , syncdb, migrate14:55
AmozI've got summit.db in summit/summit14:55
AmozI've got local_settings14:55
Amozand my django.wsgi in summit/summit -> http://paste.ubuntu.com/900569/14:56
mhall119Amoz: does your apache user have read/write access to summit.db?15:01
Amoz-.-15:01
Amozmhall119, thank you for opening my eyes15:01
mhall119:)15:01
Amozhopefully that will solve it15:01
Amozsometimes you forget the trivial stuff15:01
Amoz:)15:02
mhall119sometimes we get so caught up trying to identify a difficult problem, that we overlook the fact that it's really a simple problem15:02
AmozI know, been there maaany times15:02
Amozso frustrating when one spent hours of troubleshooting15:03
mhall119I can't even begin to recount the number of hours I've wasted looking for a logic error, when I had a missing semi-colon or something equally trivial15:03
Amozannoying15:05
Amozwhat would be the best way to let www-data get access to my stuff ?15:05
AmozI'd rather keep my files in home15:05
Amozlet www-data be part of my user's group and set stuff to 775 ?15:06
mhall119somethign like that, yeah15:07
Amozokay, it's not a permission problem mhall11915:10
Amoznot even chmod -R 777 solved it15:10
mhall119Amoz: why not just run this from django's manage.py runserver?15:11
Amozmhall119, they warn about making it public15:12
Amozand it crashes a whole lot when syntax and stuff is wrong15:12
mhall119Amoz: can you confirm that it does work that way though?15:12
mhall119that'll at least let us narrow the problem down15:13
Amozthe runserver?15:13
mhall119yeah15:13
mhall119if it'll run that way, we at least know that it's not a problem with Django15:13
Amozwell it's been running before15:13
Amozwithout problems15:14
mhall119on that server?15:14
Amozyep15:14
mhall119ok15:14
Amozmhall119, http://amoz.dyndns.org:8080/15:23
Amozhere it is with runserver15:23
mhall119ok,  so definitely unique to running it through apache15:23
Amozmost probably yes15:23
Amozhmm15:24
Amozmhall119, PATH_TRANSLATED15:30
Amoz'/home/alex/dev/summit/summit/django.wsgi/'15:30
Amozcould that be a problem?15:30
mhall119I don't know15:31
mhall119it says it cant open the db file, not that it can't find it...15:31
Amoztrue15:31
mhall119Amoz: try moving/renaming the .db file, and see if the error message changes15:31
Amozsame15:32
Amozhmm15:32
AmozI should make an absolute path to the db maybe?15:32
Amozdidn't work either15:33
Amozwell15:34
Amozthis will have to wait15:34
AmozI'll just use the runserver till someone figures it out15:35
Amozthanks for all your help so far15:35
mhall119or you can setup a MySQL/Postgres database instead of using sqlite15:45
Amozthat may solve the problem15:45
Amozsqlite is so small and easy, that's why I like to use it in dev15:46
mhall119yeah, but for multi-process stuff it's locking can be a pain15:46
Amozah15:48
AmozI suppose15:48
cjohnstonAmoz: ping20:19

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!