The web in a box - a next generation web framework for the Perl programming language

IRC log for #mojo, 2017-08-20

| Channels | #mojo index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:01 leffe It's just a directory where I store files.
00:01 CandyAngel Shouldn't that be in config?
00:02 leffe It changes.
00:02 CandyAngel During server running?
00:02 leffe yes.
00:02 CandyAngel Err.. you can change config, it just won't propagate out to the config files (unless you add that functionality)
00:03 CandyAngel How come it changes?
00:03 leffe The embedded system is a multimedia player, it plays, videos, music, ... pictures ... etc
00:03 leffe when you configure it you change things in a directory.
00:05 leffe when you finish, you tell the player where is the last configuration and it plays it from there.
00:05 CandyAngel Oh, so it is a state thing
00:05 leffe the system creates a new directory, for next transaction
00:05 leffe yes
00:06 leffe so the varible is something like CWT_DIR current working transaction dir.
00:07 leffe is there a place in app for such things? or should i place it in the model, and make the model a helper?
00:08 CandyAngel Sounds like it should be in a model and accessed through a helper, yeah
00:08 leffe Ok, great.
00:10 CandyAngel Time for me to head off to bed. All the best with your project leffe :)
00:11 leffe Thanks guys, I'm a bit lost, with all this new stuff :p
02:40 noganex joined #mojo
04:04 dboehmer_ joined #mojo
05:49 disputin joined #mojo
06:47 Vandal joined #mojo
07:25 stryx` joined #mojo
07:30 frogzilla joined #mojo
07:42 dod joined #mojo
07:48 dod joined #mojo
09:19 jabberwok joined #mojo
09:41 karjala_ joined #mojo
10:15 mariusz joined #mojo
11:59 Lee[home] joined #mojo
12:38 petru joined #mojo
13:13 mib_tommy joined #mojo
13:24 castaway joined #mojo
13:57 frogzilla hello all
13:58 frogzilla can I ask for technical help on this channel?
13:58 genio yes
13:59 frogzilla great thanks.
13:59 frogzilla I have few questions, I  am testing the latest version of mojo
13:59 dabudabu joined #mojo
14:00 frogzilla with io socket ssl 2.0.49
14:01 frogzilla after running a script that generate 10k connections
14:01 frogzilla inactivity timeout on the server is 15 seconds
14:02 frogzilla the memory rise to 350MB
14:03 frogzilla every time the script runs the memory jump and never goes down
14:03 frogzilla without ssl it stays 34MB
14:04 genio So, you have a Mojo app listening on 443. You then test using wrk or some such to push the server to 10k connections and you see a memory leak happening?
14:05 frogzilla basically it listens on 10006  and it's  a websocket app
14:05 frogzilla the app itself doesn't do anything its only accetps connections
14:05 frogzilla yes genio
14:06 genio can you pastebot your sample app?
14:06 frogzilla there is one issue that I have found with TLS.pm
14:06 genio or a stripped down version so we can take a look?
14:07 frogzilla sure I will paste it in few minutes
14:08 genio also, what issue do you see with Mojo::IOLoop::TLS?
14:10 frogzilla the following line in the function _expand
14:10 frogzilla SSL_ca_file => $args->{tls_ca}       && -T $args->{tls_ca} ? $args->{tls_ca} : undef,
14:10 frogzilla should be changed to  SSL_ca_file => $args->{tls_ca}       && -T $args->{tls_ca} ? $args->{tls_ca} : \undef,
14:10 frogzilla note the ref to undef
14:11 frogzilla otherwise the memory rise even more
14:12 fitnerd joined #mojo
14:12 genio What are you using to load test websocket connections?
14:12 frogzilla from io socket ssl documentation   If you really don't want to set a CA set SSL_ca_file or SSL_ca_path to \undef
14:12 frogzilla I am using a script that sri wrote
14:18 genio It seems likely that you'll need to wait for one of the core team members for this one.
14:24 frogzilla how can i paste the code in a pretty way ?
14:35 frogzilla ok thanks
14:50 sri frogzilla: so, how do i replicate the problem?
14:53 disputin joined #mojo
14:54 frogzilla I am pasting all the info
14:55 disputin joined #mojo
14:58 frogzilla http://mibpaste.com/ssByFh http://mibpaste.com/ZQvTTQ
14:59 sri frogzilla: you said there was a script i wrote
14:59 frogzilla yes the 10k.pl
15:00 sri you modified it
15:00 sri you're not using my script
15:01 sri sorry... i don't want to debug that
15:01 frogzilla the problem is not in the script, ok
15:03 good_news_everyon joined #mojo
15:03 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/v5fk8
15:03 good_news_everyon mojo/master 19502a0 Sebastian Riedel: use a little less memory
15:03 good_news_everyon left #mojo
15:05 frogzilla thanks for this fix
15:05 sri as far as i can tell, it doesn't really fix anything
15:06 frogzilla you can test it
15:06 sri for me memory usage goes from like 30.1MB down to 29.5MB
15:06 frogzilla how many connections ?
15:09 frogzilla just try to open 10k ssl connections with inactivity timeout of 120 and watch the memory.
15:10 frogzilla if it still 30MB so probably it is a problem in my environment configuration/libraries version
15:24 petru joined #mojo
15:32 Lee[home] joined #mojo
15:45 gryphon joined #mojo
16:01 disputin joined #mojo
16:43 ChmEarl joined #mojo
17:35 stryx` joined #mojo
17:36 disputin joined #mojo
17:58 brunoramos joined #mojo
18:25 lackerman joined #mojo
19:01 PopeFelix joined #mojo
19:25 zivester joined #mojo
19:34 PopeFelix joined #mojo
19:41 PopeF joined #mojo
19:45 PopeFelix joined #mojo
20:08 disputin joined #mojo
20:25 PopeFelix joined #mojo
20:26 disputin joined #mojo
20:35 PopeFelix joined #mojo
20:40 PopeFelix joined #mojo
20:54 PopeFelix joined #mojo
20:57 PopeF joined #mojo
21:28 romel hey guys. could you please take a look? https://ssl.thorsen.pm/paste/47b3a32d6d50
21:29 romel can't figure out why it produces the output "3 3" instead "1 3"
21:30 romel it produces expected output if i invoke asd method in first foreach loop though
21:30 pink_mist because $obj->attr() puts the subroutine in the package the $obj is blessed into
21:31 pink_mist and they're all belssed into the same package
21:31 pink_mist *blessed
21:31 pink_mist so the last one overwrites the previous ones
21:43 romel how should i proceed if i just need to generate a bunch of objects with accessors from a list of hash references?
21:46 pink_mist make sure $obj is blessed into a new package every time?
21:51 romel pink_mist: i'm sorry but i'm not sure i fully understand what do you mean exactly :( i'm creating new object with Mojo::Base->new() at every iteration, right? isn't that enough?
21:52 pink_mist no, that creates a Mojo::Base object
21:55 romel i see, thanks
22:00 pink_mist romel: https://ssl.thorsen.pm/paste/57019d8f6857 for a hacky solution that I would not really recommend
22:00 pink_mist but it works
22:02 nicomen if you know upfront what attrs you may ending up with, you could define them with has, and use the accessors directly, no?
22:04 pink_mist romel: actually, https://ssl.thorsen.pm/paste/b5d3adfd5890 is better ... much less hacky, and almost recommendable -- it doesn't make the object have an @ISA relationship with Mojo::Base though
22:05 romel thank you very much.
22:05 robx_ joined #mojo
22:05 robx joined #mojo
22:05 robx_ left #mojo
22:06 robx hi Folks
22:07 robx I'm trying to migrate a bunch of Apache v1.3 virtual hosts to Mojolicious, but am a bit lost
22:08 robx The virtual hosts consist of a random collection of static HTML content, with a smattering of CGI scripts here and there
22:08 robx I am attracted to mojolicious because of the security aspects
22:09 robx can mojo do what I wish to do?
22:10 pink_mist you mean, can it replace the CGI scripts? certainly
22:11 robx I'm struggling to understand how to configure it to handle such a scenario
22:11 robx would each CGI script be an "application"?
22:12 pink_mist it could, but that sounds like a bad approach to me
22:12 robx or would the mojo "application" be the entire vhost?
22:12 pink_mist I'd go with that, yes
22:13 robx can you point me to some docs/tutorials that would illustrate how to set it up to do this?
22:14 pink_mist http://mojolicious.org/perldoc/Mojolicious/Guides/Cookbook#Apache-mod_proxy shows how to set up your vhost to proxy to a hypnotoad running locally, which is an application server that comes with Mojolicious
22:14 pink_mist and for actually writing the app, go through http://mojolicious.org/perldoc/Mojolicious/Guides
22:15 robx I prefer nginx, but I guess it makes no difference
22:15 pink_mist there's an nginx example in the Cookbook too
22:15 robx ok. I'll study these. thanks
22:15 pink_mist I only linked to the apache one because that's what you mentioned
22:16 robx ah right :)
22:16 robx apache is too complex for me :/
22:35 disputin joined #mojo

| Channels | #mojo index | Today | | Search | Google Search | Plain-Text | summary