Poet application in production mode
Jozef Mojzis <[email protected]> Tue, 9 Dec 2014 16:06:44 +0100
| Newsgroups | gmane.comp.web.mason.user |
|---|---|
| Message-ID | <[email protected]> |
--===============6719640895668200556==
Content-Type: multipart/alternative;
boundary="Apple-Mail=_AE7328EA-6087-4BAE-ACFC-B2AABA3AEDB7"
--Apple-Mail=_AE7328EA-6087-4BAE-ACFC-B2AABA3AEDB7
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
charset=utf-8
Hello Jon and all :)
I am hopelessly lost when trying setup my Poet application for =
deployment (production env). Looking for some advices from someone who =
**really** using Poet app under heavy load (e.g. not =E2=80=9Cplackup=E2=80=
=9D, but starman or such)...
If I understand right, the the =E2=80=9Cbin/run.pl=E2=80=9D is only for =
=E2=80=9Cplaying=E2=80=9D (development) mode, it uses Poet::Server for=20=
- preload modules from the poet=E2=80=99s config
- run plackup with the port defined in the =
conf/layer/{development,deployment}.cfg
Q1: How to setup poet app to do the above but with starman? Need I write =
my own =E2=80=9Crun.pl=E2=80=9D or is here something in config what =
allows me run poet app under starman and will do the =E2=80=9Cpreload =
modules=E2=80=9D too?
Next: In the poet.conf i could setup some log:* things. These are only =
for custom logging for Poet application and has nothing with the =
=E2=80=9Cplackup/startman=E2=80=9D logging format. Right? or I again =
missed something? e.g. plackup defaultly enables =
=E2=80=9CPlack::Middleware::AcessLog with the =E2=80=9Cdefault=E2=80=9D =
(format =3D> '%h %l %u %t "%r" %>s %b "%{Referer}i" =
"%{User-agent}i=E2=80=9D';)=20
So Q2: Is possible do define access-log logging format in the poet=E2=80=99=
s conf what would be passed to the underlaying http-server? (plackup or =
starman)?
When I trying to run poet app in production mode (by setting layer: =
production in local.cfg), the Poet::Server try starting plackup as =
following:
Running plackup, -E, production, --port, 5000, --access_log, =
/path/to/myapp/logs/access.log, /path/to/myapp/bin/app.psgi
AFAIK the "=E2=80=94access_log=E2=80=9D is WRONG and should be =
=E2=80=9C=E2=80=94access-log=E2=80=9D - e.g. with dash and not with =
underscore. According to the plackup documentation =
(http://search.cpan.org/~miyagawa/Plack-1.0033/script/plackup =
<http://search.cpan.org/~miyagawa/Plack-1.0033/script/plackup>) this is =
definitely a bug, and In the current form the plackup didn=E2=80=99t =
logging anything to the /path/to/myapp/logs/access.log. (Strange than =
nobody figured out this before, therefore I the beginning of this =
question I asking about someone who **REALLY** using Poet app in =
production environment.) :)
easy to reproduce:
$ poet new myapp
edit the myapp/conf/local.cfg - set =E2=80=9Clayer: production=E2=80=9D
$ myapp/bin/run.pl
will start =E2=80=9Cplackup=E2=80=9D with args as above and will log =
nothing...
So finally - could someone give some good advices running Poet app in =
production environment, using the GREAT poet=E2=80=99s confing file =
features and like but with =E2=80=9Cstarman=E2=80=9D and/or with =
=E2=80=9CServer::Starter=E2=80=9D...
Thanx in advance=E2=80=A6
jm.
Ps: wondering why poet using for the layer definitions the word =
=E2=80=9Cproduction=E2=80=9D instead of the default plackup=E2=80=99s =
=E2=80=9Cdeployment=E2=80=9D keyword.
--Apple-Mail=_AE7328EA-6087-4BAE-ACFC-B2AABA3AEDB7
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html;
charset=utf-8
<html><head><meta http-equiv=3D"Content-Type" content=3D"text/html =
charset=3Dutf-8"></head><body style=3D"word-wrap: break-word; =
-webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" =
class=3D"">Hello Jon and all :)<div class=3D""><br class=3D""></div><div =
class=3D""><div class=3D"">I am hopelessly lost when trying setup my =
Poet application for deployment (production env). Looking for some =
advices from someone who **really** using Poet app under heavy load =
(e.g. not =E2=80=9Cplackup=E2=80=9D, but starman or such)...</div><div =
class=3D""><br class=3D""></div><div class=3D"">If I understand right, =
the the =E2=80=9Cbin/run.pl=E2=80=9D is only for =E2=80=9Cplaying=E2=80=9D=
(development) mode, it uses Poet::Server for </div><div class=3D"">-=
preload modules from the poet=E2=80=99s config</div><div class=3D"">- =
run plackup with the port defined in the =
conf/layer/{development,deployment}.cfg</div><div class=3D""><br =
class=3D""></div><div class=3D"">Q1: How to setup poet app to do the =
above but with starman? Need I write my own =E2=80=9Crun.pl=E2=80=9D or =
is here something in config what allows me run poet app under starman =
and will do the =E2=80=9Cpreload modules=E2=80=9D too?</div><div =
class=3D""><br class=3D""></div><div class=3D"">Next: In the poet.conf i =
could setup some log:* things. These are only for custom logging for =
Poet application and has nothing with the =E2=80=9Cplackup/startman=E2=80=9D=
logging format. Right? or I again missed something? e.g. plackup =
defaultly enables =E2=80=9CPlack::Middleware::AcessLog with the =
=E2=80=9Cdefault=E2=80=9D (format =3D> '%h %l %u %t "%r" =
%>s %b "%{Referer}i" "%{User-agent}i=E2=80=9D';) </div><div =
class=3D""><br class=3D""></div><div class=3D"">So Q2: Is possible do =
define access-log logging format in the poet=E2=80=99s conf what would =
be passed to the underlaying http-server? (plackup or =
starman)?</div><div class=3D""><br class=3D""></div><div class=3D"">When =
I trying to run poet app in production mode (by setting layer: =
production in local.cfg), the Poet::Server try starting plackup as =
following:</div><div class=3D""><br class=3D""></div><div =
class=3D"">Running plackup, -E, production, --port, 5000, =
--access_log, /path/to/myapp/logs/access.log, /path/to/myapp/bin=
/app.psgi</div><div class=3D""><br class=3D""></div><div class=3D"">AFAIK =
the "=E2=80=94access_log=E2=80=9D is WRONG and should be =
=E2=80=9C=E2=80=94access-log=E2=80=9D - e.g. with dash and not with =
underscore. According to the plackup documentation (<a =
href=3D"http://search.cpan.org/~miyagawa/Plack-1.0033/script/plackup" =
class=3D"">http://search.cpan.org/~miyagawa/Plack-1.0033/script/plackup</a=
>) this is definitely a bug, and In the current form the =
plackup didn=E2=80=99t logging anything to the =
/path/to/myapp/logs/access.log. (Strange than nobody figured out this =
before, therefore I the beginning of this question I asking about =
someone who **REALLY** using Poet app in production environment.) =
:)</div><div class=3D""><br class=3D""></div><div class=3D"">easy to =
reproduce:</div><div class=3D""><br class=3D""></div><div class=3D"">$ =
poet new myapp</div><div class=3D"">edit the myapp/conf/local.cfg - set =
=E2=80=9Clayer: production=E2=80=9D</div><div class=3D"">$ =
myapp/bin/run.pl</div><div class=3D""><br class=3D""></div><div =
class=3D"">will start =E2=80=9Cplackup=E2=80=9D with args as above and =
will log nothing...</div><div class=3D""><br class=3D""></div><div =
class=3D"">So finally - could someone give some good advices running =
Poet app in production environment, using the GREAT poet=E2=80=99s =
confing file features and like but with =E2=80=9Cstarman=E2=80=9D and/or =
with =E2=80=9CServer::Starter=E2=80=9D...</div><div class=3D""><br =
class=3D""></div><div class=3D"">Thanx in advance=E2=80=A6</div><div =
class=3D""><br class=3D""></div><div class=3D"">jm.</div><div =
class=3D""><br class=3D""></div><div class=3D"">Ps: wondering why poet =
using for the layer definitions the word =E2=80=9Cproduction=E2=80=9D =
instead of the default plackup=E2=80=99s =E2=80=9Cdeployment=E2=80=9D =
keyword.</div><div class=3D""><br class=3D""></div></div></body></html>=
--Apple-Mail=_AE7328EA-6087-4BAE-ACFC-B2AABA3AEDB7--
--===============6719640895668200556==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
--===============6719640895668200556==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
Mason-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mason-users
--===============6719640895668200556==--