suddenly can't resolve hosts inside PHP but wget is fine

aww

Well-Known Member
#1
I've been working on some code using curl inside of php via litespeed.

Suddenly tonight I cannot resolve hosts for curl or gethostbyname

I've editied resolv.conf, restarted php, restarted lsws, even restarted the entire vps - no change.
I also temporarily disabled the server firewall - no change.

This makes me think litespeed is caching the dns somewhere? Except I have no clue where.

Remember, outside of lsws+php the weather is fine, wget and ping can find the exact same failing hosts without trouble.

Thanks for any help, this is driving me bonkers and holding up my work...
 
Last edited:

mistwang

LiteSpeed Staff
#2
I think it might be PHP memory limit issue, try increasing the "Process Soft/Hard limit" for the php external application, and there are a memory limit in php.ini, you should increase that as well.
 

aww

Well-Known Member
#3
You may be right as far as it being a memory issue and I solved it by accident.

As I was trying to figure out what was going wrong and while scanning the code I realized I was maniputing/copying huge arrays in memory and not unsetting the previous array. I changed that and mysteriously everything is working again.

Thanks as always!
 
Top