Askozia Forums
February 09, 2012, 12:34:32 am *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Error message after updating provider  (Read 2385 times)
lehey
Newbie
*

Karma: 0
Posts: 22


View Profile
« on: October 01, 2008, 12:45:01 pm »

Lately, I have regular messages like this one when I update a provider account:
"Warning: fsockopen(): unable to connect to localhost:5038 in /etc/inc/pbx.inc on line 163 Warning: fsockopen(): unable to connect to localhost:5038 in /etc/inc/pbx.inc on line 163"

When I reboot, everything goes back to normal. Any idea ? Do you need more info from my part ?
Thanks,
Yann
Logged
zetaerre
Full Member
***

Karma: 0
Posts: 71


View Profile
« Reply #1 on: October 01, 2008, 01:59:24 pm »

Hi,

I've the same problem.

Scenario:

Wrap 1e with 64Mb RAM and 32 Mb CF card.
Uptime 60 days, memory at 86%.
All system is up and ready, internal and external calls are ok.

Open the browser, point it to askoziaip and BANG... Asterisk die.
Out of memory?

Restarted, like never happened, all is running and up, internal/external phone calls, I mean it's ok.

What's your hardware?
« Last Edit: October 01, 2008, 03:13:11 pm by zetaerre » Logged
lehey
Newbie
*

Karma: 0
Posts: 22


View Profile
« Reply #2 on: October 01, 2008, 02:15:36 pm »

Wrap 266MHz, 64MB memory and 1GB CF
Before updating to the latest version, no problem, but since V1.0 or 1.1, I have regular error messages like that, and Asterisk dies (from what I see in the providers page, no provider is registered. I do not even see a red icon showing that Asterisk is up but cannot register to the provider)
Yann
Logged
lehey
Newbie
*

Karma: 0
Posts: 22


View Profile
« Reply #3 on: October 01, 2008, 07:52:49 pm »

I have just checked the system log, and here is what I found:
"kernel: pid 154 (asterisk), uid 0, was killed: out of swap space"
before I reboot.
My thoughts are that the problem lies in one of the php script. Whenever I point to the log page, memory goes from 85-88% to 97-99%
Yann
Logged
lehey
Newbie
*

Karma: 0
Posts: 22


View Profile
« Reply #4 on: October 01, 2008, 07:54:16 pm »

Correction: memory goes to 99% only when opening pbx log, not system log.
Yann
Logged
Michael
Askozia Staff
Hero Member
*

Karma: 50
Posts: 1020


View Profile
« Reply #5 on: October 02, 2008, 08:42:55 am »

I have a bad feeling the new log pagination and sorting code is to blame. Depending on how its resources are managed, it could be loading those huge logs into memory before splitting and sorting.

Are you also using the logging package?
Logged
lehey
Newbie
*

Karma: 0
Posts: 22


View Profile
« Reply #6 on: October 02, 2008, 12:53:18 pm »

Yes I use it, and after posting my last message, I was thinking of deleting it.
Yann
Logged
lehey
Newbie
*

Karma: 0
Posts: 22


View Profile
« Reply #7 on: October 02, 2008, 01:11:17 pm »

Ok, so I just deleted the package. Asterisk died right after that. Rebooted the board.
Memory was 81%
looked at the system log, then pbx log...
went back to the sumary screen: memory is still 81%
So I believe further investigation should be made on how memory is managed by the package. At least for now, as keeping a log across reboots is not critical for me but only on my wish list, I will not be afraid anymore that Asterisk could die whenever the kernel needs it.  Cool
Thanks,
Yann
Logged
giovanni.v
Hero Member
*****

Karma: 51
Posts: 666


View Profile
« Reply #8 on: October 02, 2008, 01:36:15 pm »

I have a bad feeling the new log pagination and sorting code is to blame.

I've already looked at this code in the past but forgot to notify... i think a first optimization can be done modifyng the SQL in the main pagination function for cdr, display_calculate_pages_sqlite().
Now you retrieve all the rows/data in the cdr table to simply get/count the number of rows using "SELECT * FROM cdr...", This can be optimized using a "SELECT id FROM cdr..." or better "SELECT COUNT(id) FROM cdr...".
You can save a lot of memory this way, especially the latest may be a lot faster, try yourself...
« Last Edit: October 02, 2008, 01:41:02 pm by Iax » Logged
Michael
Askozia Staff
Hero Member
*

Karma: 50
Posts: 1020


View Profile
« Reply #9 on: October 04, 2008, 01:17:08 pm »

Thanks for the info Iax, as usual you're on top of things Wink

If you're able to submit any patches please do so. I did not write that code so, if you're already taken a look and understood it, you're at an advantage.
Logged
giovanni.v
Hero Member
*****

Karma: 51
Posts: 666


View Profile
« Reply #10 on: October 04, 2008, 02:57:06 pm »

If you're able to submit any patches please do so.

I will test it on a fresh install monday afternoon in the lab then mail to you if no problems arise.
I'm not sure can solve all the memory problems discussed here, only a big cut of "memory spyke" hitting the cdr gui page.
Logged
osa2
Full Member
***

Karma: 0
Posts: 81


View Profile
« Reply #11 on: October 14, 2008, 03:03:36 pm »

Don't know if it help you all. But I get the same error I guess.


Warning: fsockopen(): unable to connect to localhost:5038 in /etc/inc/pbx.inc on line 163 Warning: fsockopen(): unable to connect to localhost:5038 in /etc/inc/pbx.inc on line 163

Will disable the logging package do the fix?
Logged

Askozia 1.0.3 + Alix 3C + Grandstream sip phones + B200M openVox ISDN
osa2
Full Member
***

Karma: 0
Posts: 81


View Profile
« Reply #12 on: November 25, 2009, 04:08:41 pm »

Any solutions yet on this matter? As I'm expierincing this behaviour again.

Warning: fsockopen(): unable to connect to localhost:5038 in /etc/inc/pbx.inc on line 163 Warning:
I don't have the logging package installed. Please advice on this matter.
Logged

Askozia 1.0.3 + Alix 3C + Grandstream sip phones + B200M openVox ISDN
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 0.169 seconds with 20 queries.