what means pastebin?
right now all i added to ssjs is stuff with mysql queries.
first i have changed nickname.js file because i need to see who came
to the server and who left, but after server crushed i deleted this
code and back to previouse one, but did not help. so i think problem
is not here.
about this mysql queries it looks like this:
var test2OnlineChannel = Ape.mkChan('test_online');
var testOnlineChannel = Ape.mkChan('test2_online');
function onlineQuery(){
query = "SELECT * FROM `logs`";
sql.query(query, function(res, errorNo) {
if (errorNo) Ape.log('Request error : ' + errorNo + ' : '+
this.errorString());
else {
res.each(function(data) {
var test_online = data.test_online;
var test2_online = data.test2_online;
testOnlineChannel.pipe.sendRaw('test_online',
{'value':test_online});
tes2tOnlineChannel.pipe.sendRaw('test2_online',
{'value':test2_online});
});
}
});
}
or this one
var testEmailsChannel = Ape.mkChan('test_emails');
var test2EmailsChannel = Ape.mkChan('test2_emails');
function emailsQuery(){
query = "SELECT * FROM tblEmails where `read` = 0";
sql.query(query, function(res, errorNo) {
if (errorNo) Ape.log('Request error : ' + errorNo + ' : '+
this.errorString());
else {
res.each(function(data) {
var email_id = data.email_id;
var from = data.from;
var to = data.to;
var site = data.site;
if(site==1){
emailsChannel = testEmailsChannel;
emails = 'test_emails';
}else if (site==2){
emailsChannel = test2EmailsChannel;
emails = 'test2_emails';
}
emailsChannel.userslist.each(function(user) {
var user_name = user.getProperty('name');
if(to==user_name){
user.pipe.sendRaw(emails, {"email_id":email_id,
"from":from, "to":to});
}
});
sendEmailStatus(email_id);
});
}
});
}
i have 3 functions like this one, because i need to send 3 separate
informations to every user that joined channel.
i repeat this 3 functions every 3 or 5 seconds, interval
problem is that in my site i am using mssql so i cannot connect to my
db via ape, need to link connection between db's push data to mysql
from mssql and then via ape to users on the site.
i think this can be problem for server.
any suggestions how to improve this feature?
On 1 Mar, 14:49, <[email protected]> wrote:
> This may be caused by a SSJS script you wrote.
>
> Pastebin?
>
> On Tue, 1 Mar 2011 04:54:24 -0800 (PST), kentsh <[email protected]>
> wrote:> unfortunately the same situation, server was i think longer up but
> > again crushed..
> > any other ideas? what can i do to check what is the reason?
>
> > On 1 Mar, 12:37, <[email protected]> wrote:
> >> There is about more than 50 bug/leak fixes. So yes, update.
>
> >> On Tue, 1 Mar 2011 03:32:16 -0800 (PST), kentsh
>
> <[email protected]>
>
> >> wrote:> not now, i did newest install at december
> >> > any changes since that time which corrected this issue?
> >> > i did this change:
> >> > "rt = JS_NewRuntime(128L * 1024L * 1024L);
> >> > to
> >> > rt = JS_NewRuntime(8L * 1024L * 1024L);"
> >> > what more can i do?
>
> >> > On 1 Mar, 12:29, <[email protected]> wrote:
> >> >> Hi,
>
> >> >> Did you update to the git version?
>
> >> >> On Tue, 1 Mar 2011 03:22:35 -0800 (PST), kentsh
>
> >> <[email protected]>
>
> >> >> wrote:
>
> >> >> > hi,
> >> >> > can you help me with my application, (instant message,
> notification)
> >> >> > its going to crush every few hours after launch?
> >> >> > it looks like this
>
> >> >> > strange thing is that app was live about one week and all was ok
> (at
> >> >> > the beggining and now about 50-60 users all the time online), but
> >> then
> >> >> > suddenly it crushed and doing this all the time after launch
> server.
> >> >> > what can i do with this?
>
>
--
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/