--Apple-Mail=_975D0C8D-365C-468C-8B6E-B021C554F08F
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=us-ascii

Hello,

I'm developing a sinatra application. When deployed on a FreeBSD server =
the OAuth calls slow down incredibly. I don't know why this happens and =
I'm not even sure where or what to start looking for.
The program does a series of OAuth2 calls. I wrote a script to test an =
OAuth2 call and logged the results:

--
#!/usr/bin/env ruby

require './pritory'
require 'benchmark'

x =3D Skroutz::Query.new
Benchmark.bm do |bm|
  bm.report do
    # Fetch price and print!
    x.skroutz_check '3517212' # =3D> returns price String e.g. '72.12'
  end
end
--

## OSX
ruby --version && uname -a

ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-darwin13.0.0]
Darwin gauss.local 13.3.0 Darwin Kernel Version 13.3.0: Tue Jun  3 =
21:27:35 PDT 2014; root:xnu-2422.110.17~1/RELEASE_X86_64 x86_64

macosx-dev> ruby test.rb=20
       user     system      total        real
   0.110000   0.020000   0.130000 (  4.564007)



## FreeBSD
ruby --version && uname -a

ruby 2.1.2p95 (2014-05-08 revision 45877) [amd64-freebsd10]
FreeBSD myhostname.net 10.0-RELEASE FreeBSD 10.0-RELEASE #0 r260789: Thu =
Jan 16 22:34:59 UTC 2014     =
root / snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64  =20

freebsd-10-prod> ruby test.rb=20
       user     system      total        real
   0.117188   0.007812   0.125000 ( 71.876525)
----

The module code can be found here: =
https://github.com/atmosx/pritory/blob/master/helpers/skroutz.rb


Any ideas where/what to start looking for?=20

The FreeBSD server runs on a VM as a VPS. There are other applications =
without problems (sinatra apps + ruby scripts).


Panagiotis (atmosx) Atmatzidis

email:	atma / convalesco.org
URL:	http://www.convalesco.org
GnuPG ID: 0x1A7BFEC5
gpg --keyserver pgp.mit.edu --recv-keys 1A7BFEC5

"As you set out for Ithaca, hope the voyage is a long one, full of =
adventure, full of discovery [...]" - C. P. Cavafy





--Apple-Mail=_975D0C8D-365C-468C-8B6E-B021C554F08F
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename=signature.asc
Content-Type: application/pgp-signature;
	name=signature.asc
Content-Description: Message signed with OpenPGP using GPGMail

-----BEGIN PGP SIGNATURE-----
Comment: Public Key Encryption

iQIcBAEBAgAGBQJUEiWZAAoJEPy01a8ae/7FYzIQAK+jrnWIHXpbsbSnOCZVsMXx
Hx9FoeerDHZVFq4G21RlZLrM7yCOWSCxa2DhCLg797yu0S+BsPNdrGkPq8+WzLmF
KJUuesRM75VmkAoLlyq2GzjNwn9ASMCpwXKmkePH0WYxG9v4Fh2WqrXGKVS+fkBB
xI+w+yNYCpURwDEKeTERw2rcxFWU7mLy6JXs70c0xaCMGJacCOPgLiUpBjfJk2GP
Mkq7zam457DxeiyyuC86acYTMY0Zn5Sl2mdaN1MCm/XV6feFaP5fvsSUdf8unG3M
qcU3x6zHnaS/kluykiRnfp/JJhqwIniazTBDqvSr4yvtyQDh9xH/pvqrESX9wZnu
QoOP187UvIfgXbBaFWhLdoaK5ModSCocqfOYgPJEHO4LwOxZ4+KpZaEX7yWt+GNC
2ICTQvN3h5T60e1fw7OhH8dw/o2X0hooJFRhEiEAVL4VqeDdU2CiT3jb5jW7BVgd
O3Oxnpi+F80Dh4Jn8RGFidOUzAdHnSXFfjaN6hhNflxd073DyadNEFoT19gg3BfY
hSnKkWEjK2DHRTWk7hiUgsvLCtxhc86mSjy9plsPYmwy6JOiAZ2c8P+Wyw1VCHNF
/WcOyuRpGSUIfj5TvgdlS8zgTuDTD20kfNfDgGCQE0DgnDXp4QqmQMRRaC5VTb1w
ENtAvB4tma9NCqO/v99V
=Cn4F
-----END PGP SIGNATURE-----

--Apple-Mail=_975D0C8D-365C-468C-8B6E-B021C554F08F--