16:55 PM
ruaok
I can tell. Its written in "proper" english. :)
16:56 PM
ruaok composes a strong follow-up email
16:56 PM
Swarup
hi ruaok!
16:57 PM
ruaok
I dont think I really understood your last email to me. try me again, please?
16:58 PM
Swarup
basically when we shutdown all our webservice apps (apprx 5-6) on multiple hosts....response is fine now with single user test..
16:59 PM
ruaok
ah, I see.
16:59 PM
we need to check some configs then to see where the bottle neck might be.
16:59 PM
ah!
16:59 PM
you're still running the mb_server inside the VM, right?
17:00 PM
Swarup
so i recall warp or someone mentioned on Friday chat..that MB server looks for it's clients that requests came from..
17:00 PM
yes
17:00 PM
and we've our webservice on top that connects to this mb server..
17:00 PM
ruaok
did you ever change the web server inside the VM?
17:01 PM
because right now its using a dev server setup.
17:01 PM
bitmap joined the channel
17:01 PM
but since we're now actually deploying this, you ought to install nginx inside the VM and deploy the mb-server app inside that.
17:01 PM
I think I may switch to this method for an upcoming release of the VM.
17:01 PM
or at least allow both to be done easily.
17:02 PM
Swarup
change webserver? didn't get that..like what?
17:03 PM
ruaok
so, the VM comes setup with a catalyst based development server.
17:03 PM
that isn't meant to handle more than 1-2 clients connecting to it.
17:03 PM
Swarup
ha ok..
17:03 PM
ruaok
so, we need to deploy a better web server inside the Vm that has more throughput.
17:04 PM
Swarup
no we didn't change on that side..only thing we changed was point to our own external postgres mb db host, and search server
17:04 PM
ruaok
have you ever used nginx?
17:04 PM
ah, ok.
17:04 PM
yeah, we need to tweak that then.
17:04 PM
Swarup
no ..but i can try..
17:05 PM
ruaok
all the hard stuff is done for you, since we deploy to nginx
17:06 PM
log into the VM
17:06 PM
then
17:06 PM
apt-get install nginx
17:06 PM
Swarup
k
17:06 PM
ruaok
ping me when that's done so we can configure the server.
17:07 PM
Leftmost joined the channel
17:07 PM
Swarup
i guess i need to be root ..right?
17:07 PM
ruaok
yep
17:07 PM
sudo su -
17:07 PM
password is musicbrainz, unless you folks changed that
17:08 PM
Swarup
done
17:09 PM
ruaok
cd /etc/nginx
17:10 PM
hmmm.
17:10 PM
all the config files are in ~musicbrainz/admin/nginx
17:10 PM
so we're going to link to those files with symlinks.
17:11 PM
gimme a sec while I fire up an instance.
17:11 PM
Swarup
ok
17:19 PM
reosarevok
17:19 PM
ocharles
moin ruaok !
17:19 PM
reosarevok considers mailing them and asking for it to stop :p
17:19 PM
ruaok
moin ocharles
17:20 PM
nikki
ruaok: "proper" english? does that mean I write in such a british way or that reosarevok can't speak english? :P
17:20 PM
ruaok
nikki: a little of both. :)
17:20 PM
Leftmost
reosarevok, you'll probably just get sucked into a cult if you do that. :P
17:20 PM
reosarevok goes cry in the corner
17:20 PM
reosarevok
:p
17:20 PM
ruaok
awww, sorry reosarevok
17:21 PM
reosarevok
Leftmost, I can't, I'm already in the MB cult :p
17:22 PM
Leftmost
Where we worship consistent data.
17:23 PM
reosarevok won't mail them because he doesn't want to get sent sect stuff daily anyway
17:23 PM
reosarevok guesses they'd see it as a "PLZ SUBSCRIBE ME TO YR NEWZLETTA"
17:26 PM
reosarevok
ruaok: funnily enough, someone requested something pretty similar to what we were talking about on Style yesterday :p
17:26 PM
(completely independently)
17:26 PM
ruaok finally gets the VM to boot
17:28 PM
ruaok
Swarup: lets continue.
17:28 PM
Swarup
k
17:28 PM
ruaok
cd /etc/nginx/sites-available
17:29 PM
Swarup
done
17:29 PM
ruaok
ln -s ~musicbrainz/musicbrainz-server/admin/nginx/001-musicbrainz .
17:29 PM
cd ../sites-enabled/
17:30 PM
rm default
17:30 PM
ln -s ../sites-available/001-musicbrainz .
17:30 PM
warp
17:31 PM
ocharles
warp: okie doke
17:31 PM
Swarup
ruaok..done
17:31 PM
ruaok
Swarup:
17:31 PM
cd ..
17:31 PM
mv nginx.conf nginx.conf.default
17:32 PM
Swarup
done
17:33 PM
ruaok
that may be all we need to do, but I need to double check that. hold on
17:33 PM
ln -s ~musicbrainz/musicbrainz-server/admin/nginx/mbserver-rewrites.conf .
17:34 PM
zacd joined the channel
17:34 PM
uh oh.
17:34 PM
zacd
Mmm?
17:34 PM
ruaok
the posse slowly rolls in.
17:34 PM
hi zacd! :)
17:35 PM
zacd
Took me a while to run an extension cord outside the fence. Port 6667 is blocked on the office net.
17:35 PM
ruaok
lol
17:35 PM
Swarup:
17:35 PM
/etc/init.d/nginx stop
17:35 PM
/etc/init.d/nginx start
17:35 PM
kepstin-netbook
zacd: freenode has a web irc client that just uses port 80.
17:35 PM
ruaok
ah, before you do that, stop the dev server, Swarup
17:35 PM
Swarup
ok
17:36 PM
ruaok
might be ok, since dev server runs on a different port, but still.
17:36 PM
now if you go to the servers address you should get a 502 bad gateway error.
17:37 PM
Swarup
got this..probably some setup issue..
17:37 PM
../etc/init.d/nginx start Starting nginx: [emerg]: open() "/etc/nginx/nginx.conf" failed (2: No such file or directory) configuration file /etc/nginx/nginx.conf test failed
17:38 PM
zacd
What're you guys trying to do, exactly?
17:39 PM
Swarup
setting up nginx on mb vm ..to handle throughput..
17:39 PM
ruaok
Swarup: ls /etc/nginx
17:40 PM
zacd
But like...
17:40 PM
ruaok
you should have a symlink from nginx.conf going to /home/musicbrainz/musicbrainz-server/admin/nginx/nginx.conf
17:40 PM
zacd
We're not running out of host resources from what I can tell...
17:40 PM
Swarup
ls /etc/nginx conf.d fastcgi_params koi-utf koi-win mbserver-rewrites.conf mime.types nginx.conf.default scgi_params sites-available sites-enabled uwsgi_params win-utf
17:40 PM
zacd
What are we running out of?
17:40 PM
ruaok
zacd: the server that ships with the VM is a dev server not setup for a great amount of throughput.
17:40 PM
not sure of the exact thing we're running out of, but we were doing it wrong for this case.
17:41 PM
so we're setting up nginx, to do it right.
17:41 PM
then we can check to see the throughput. that should improve things a lot.
17:41 PM
Swarup: cd /etc/nginx
17:42 PM
ln -s ~musicbrainz/musicbrainz-server/admin/nginx/nginx.conf .
17:42 PM
Swarup
y on it
17:42 PM
ruaok
then try the start again
17:42 PM
k
17:42 PM
kepstin-laptop joined the channel
17:43 PM
Swarup
../etc/init.d/nginx start Starting nginx: [emerg]: open() "/etc/nginx/site-name.conf" failed (2: No such file or directory) in /etc/nginx/sites-enabled/001-musicbrainz:3 configuration file /etc/nginx/nginx.conf test failed
17:43 PM
ruaok
ah, I think my vm is a bit behind the times.
17:43 PM
Swarup
should i add same sym link for it too..
17:44 PM
ruaok
that file isn't in git.
17:44 PM
one sec.
17:44 PM
ocharles
warp: ship ship ship
17:45 PM
warp
ocharles: yay!
17:45 PM
ruaok
Swarup: create the file and have it contain only one line:
17:45 PM
17:45 PM
Swarup
k
17:45 PM
ruaok
thats for our server. put whatever valid DNS name you intent to use in there.
17:45 PM
then restart
17:46 PM
(nginx that is)
17:46 PM
Swarup
../etc/init.d/nginx start Starting nginx: [warn]: duplicate MIME type "text/html" in /etc/nginx/sites-enabled/001-musicbrainz:16 [warn]: duplicate MIME type "text/html" in /etc/nginx/sites-enabled/001-musicbrainz:29 nginx.
17:46 PM
warnings..is that ok..
17:47 PM
ruaok
yeah. I'll leave that to you to clean up. ;)
17:47 PM
Swarup
k
17:48 PM
ruaok
ok, we're half done.
17:48 PM
apt-get install daemontools daemontools-run
17:49 PM
Swarup
done
17:49 PM
ruaok
cd /usr/local
17:49 PM
mkdir musicbrainz-server
17:49 PM
cd musicbrainz-server/
17:50 PM
Swarup
k
17:50 PM
done
17:50 PM
ruaok
cp ~musicbrainz/musicbrainz-server/admin/nginx/service/run .
17:50 PM
edit run
17:51 PM
look for nproc
17:51 PM
its set to 5
17:51 PM
that is the number of processes to start
17:51 PM
how much ram does the VM have?
17:53 PM
Swarup
done..command to check ram..let me see..
17:53 PM
ruaok
free
17:54 PM
Swarup
total used free shared buffers cached Mem: 1024968 617204 407764 0 105868 426012 -/+ buffers/cache: 85324 939644 Swap: 1044476 3800 1040676
17:54 PM
ruaok
that will also be a problem for you guys.