Anthony, Excellent, sounds good, we're using a 32-bit platform.
Looking forward to hearing from you, Doug On Apr 1, 11:25 am, <[email protected]> wrote: > Thanks ;) > I'll run the same test tonight. I give you my results tomorrow ;) > > oh and BTW 32 or 64bits ? > > Thanks > > On Fri, 1 Apr 2011 10:21:57 -0700 (PDT), Doug <[email protected]> > wrote: > > > > > > > > > Anthony, > > > Well a similar situation was happening with APE 1.0. APE's process > > would slowly increase and eventually it reach a certain point (around > > 15% to 20%). At this point, I would attempt to post and it would > > return "UNKNOWN CHANNEL" which would normally happen when nobody is > > listening to that channel. Usually it took about 6-8 hours to reach > > this point. > > > Under 1.1.0, it appears to be a similar time frame, (perhaps a little > > longer ~10 to ~12 hours) and the memory consumption is much lower > > (around 1.9%), however at this point a post-attempt will return > > "BAD_PARAMS." > > > The test I conducted with 1.1.0 was about ten posts a second, but > > under the 1.0 version the traffic was much heavier, probably around > > 100 a second. 1.0 seemed to handle this really well, I automatically > > restarted the 1.0 server every 6 hours and it definitely did the job. > > > Thank you, > > Doug > > > On Apr 1, 9:35 am, <[email protected]> wrote: > >> Ok, so you didn't have this issue with APE 1.0 ? > >> How many messages do you send before encoutering it ? > > >> Thanks > > >> On Fri, 1 Apr 2011 08:31:37 -0700 (PDT), Doug > > <[email protected]> > > > > > > > > >> wrote: > > >> > Anthony, > > >> > I haven't changed any of the other APE server script, just what I got > >> > from you in the 1.1.0 release. Perhaps I could turn some more logging > >> > on to debug some more? > > >> > Thanks for your hard work on this project, > >> > Regards, > >> > Doug > > >> > On Mar 31, 3:13 pm, Doug <[email protected]> wrote: > >> >> I'm sorry I must have misunderstood, the way I am sending the events > >> >> is through a PHP script similar to the one that I found on APE's > >> >> website that does a single POST: > > >> >> <?php > >> >> $c=0; > >> >> while($c <= 5) { > >> >> $APEserver = 'http://mydomain:6969/?'; > >> >> $APEPassword = 'mypasswd'; > > >> >> $messages = array( > >> >> 'Test Message', > >> >> 'test2', > >> >> 'test3', > >> >> ); > > >> >> $cmd = array(array( > >> >> 'cmd' => 'inlinepush', > >> >> 'params' => array( > >> >> 'password' => $APEPassword, > >> >> 'raw' => 'DATA', > >> >> 'channel' => 'mychannelname', > >> >> 'data' => array( //Note: data can't be a string > >> >> 'message' => $messages[array_rand($messages)] > >> >> ) > >> >> ) > >> >> )); > >> >> echo "<br><br>".json_encode($cmd)."<br><br>"; > >> >> var_dump($APEserver.rawurlencode(json_encode($cmd))); > >> >> $data = > >> >> file_get_contents($APEserver.rawurlencode(json_encode($cmd))); > >> >> $data = json_decode($data, TRUE); > > >> >> if ($data[0]->data->value == 'ok') { > >> >> echo 'Message sent!'; > >> >> } else { > >> >> //echo 'Error sending message, server response is : <pre>'. > >> >> print_r($data); > >> >> echo '</pre>'; > >> >> } > >> >> $c++; > > >> >> } > > >> >> ?> > > >> >> This is the page that tells me "ok" sending the message until the > >> >> server reaches 1.9% and then it returns BAD_PARAMS, the listening > page > >> >> doesn't seem aware of any problems. > >> >> Thank you, regards, > >> >> Doug > > >> >> On Mar 31, 2:51 pm, Anthony Catel <[email protected]> wrote: > > >> >> > So, If I understand correctly, at the begening everything works > fine > >> >> > and > >> >> > sudently stop working with a "BAD_PARAMS". > >> >> > You don't have any server-side script? > > >> >> > Le 31/03/2011 22:05, Doug a crit : > > >> >> > > Hi Anthony, > > >> >> > > Thanks for the response, I am testing with 4 concurrent users. > > >> >> > > I am working with a Fedora, Amazon Linux AMI, EC2 instance, > here's > >> >> > > some specs: > > >> >> > > Small Instance default* > >> >> > > 1.7 GB memory > >> >> > > 1 EC2 Compute Unit (1 virtual core with 1 EC2 Compute Unit) > >> >> > > 160 GB instance storage > >> >> > > 32-bit platform > >> >> > > I/O Performance: Moderate > >> >> > > API name: m1.small > > >> >> > > I have added a function that wraps the APE.Client(); code (I > only > >> run > >> >> > > startRT() from the listener page): > > >> >> > > function startRT(channel, callback) { > >> >> > > var client = new APE.Client(); > >> >> > > client.load(); > >> >> > > client.addEvent('load', function() { > >> >> > > client.core.start(); > >> >> > > }); > >> >> > > client.addEvent('ready', function() { > >> >> > > myJoin(client , channel); > >> >> > > client.onRaw('data', function(raw, pipe) { > >> >> > > callback(raw.data); > >> >> > > }); > >> >> > > }); > >> >> > > return client; > >> >> > > } > > >> >> > > function myJoin(client, channel) { > > >> >> > > if(isArray(channel) == false) { > >> >> > > channel = removeNonAlphas(channel); > >> >> > > client.core.join(channel); > >> >> > > } > >> >> > > else { > >> >> > > for (var i in channel) { > >> >> > > channel[i] = removeNonAlphas(channel[i]); > >> >> > > } > >> >> > > client.core.join(channel); > >> >> > > } > >> >> > > var channelpipe = channel.toLowerCase(); > >> >> > > } > > >> >> > > function removeNonAlphas(channel){ > >> >> > > channel = channel.replace(/[^a-zA-Z 0-9]+/g,''); > >> >> > > return channel; > >> >> > > } > > >> >> > > function isArray(obj) { > >> >> > > if (obj.constructor.toString().indexOf("Array") == -1) > >> >> > > return false; > >> >> > > else > >> >> > > return true; > >> >> > > } > > >> >> > > Thank you! > > >> >> > > On Mar 31, 11:51 am, Anthony Catel<[email protected]> wrote: > >> >> > >> Hi doog, > > >> >> > >> You don't have any custom server-side javascript? > > >> >> > >> How many concurent users do you have? > >> >> > >> What is your CPU architecture? > > >> >> > >> Thanks > > >> >> > >> Le 31/03/2011 19:18, Doug a crit : > > >> >> > >>> I've been experimenting with the new APE 1.1.0, and it appears > >> >> > >>> that it > >> >> > >>> works until memory consumption of the aped process reaches > 1.9% > >> and > >> >> > >>> then whenever I attempt to post some data I get > >> >> > >>> Array ( [time] => 1301590992 [raw] => ERR [data] => > >> Array > >> >> > >>> ( [code] => > >> >> > >>> 001 [value] => BAD_PARAMS ) ) ) > >> >> > >>> I can open a channel and I see this in ape.log: > >> >> > >>> 2011-03-30 15:58:21 - src/users.c:180 - New user - (ip : > >> >> > >>> 2.my.ip.69) > >> >> > >>> So it appears to recognize that somebody has joined the > channel > >> >> > >>> and is > >> >> > >>> listening. Also, the page I have set up that listens to the > >> channel > >> >> > >>> sends no errors, it includes the js file and its allocated a > >> >> > >>> numbered > >> >> > >>> subdomain like it should (4.mydomain.com, for example). > >> >> > >>> My main.ape.js looks like this: > >> >> > >>> Ape.addEvent("init", function() { > >> >> > >>> include("framework/mootools.js"); > >> >> > >>> include("framework/Http.js"); > >> >> > >>> //include("framework/userslist.js"); > >> >> > >>> include("utils/utils.js"); > >> >> > >>> include("commands/proxy.js"); > >> >> > >>> include("commands/inlinepush.js"); > >> >> > >>> //include("examples/nickname.js"); > >> >> > >>> //include("examples/move.js"); > >> >> > >>> //include("utils/checkTool.js"); //Just needed for the APE > >> JSF > >> >> > >>> diagnostic tool, once APE is installed you can remove it > >> >> > >>> //include("examples/ircserver.js"); > >> >> > >>> //include("framework/http_auth.js"); > >> >> > >>> }); > >> >> > >>> I've commented out some stuff that I didn't think I needed. > This > >> >> > >>> configuration works on an earlier installation (1.01a I > >> >> > >>> believe). > >> >> > >>> The > >> >> > >>> problem with the earlier version is memory consumption, but it > >> >> > >>> seems > >> >> > >>> to happen at a higher percentage (round about 15-20%). > >> >> > >>> I have tried using the older JSF and the newest one I could > find > >> on > >> >> > >>> github, behavior appears to be identical. > >> >> > >>> I have fixed the older installation by running a cronjob every > 6 > >> >> > >>> hours > >> >> > >>> to restart the ape process. > >> >> > >>> Any advice or suggestions would be a huge help, thank you! -- You received this message because you are subscribed to the Google Groups "APE Project" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/ape-project?hl=en --- APE Project (Ajax Push Engine) Official website : http://www.ape-project.org/ Git Hub : http://github.com/APE-Project/
