Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Too Many Connections

Status
Not open for further replies.

audiopro

Programmer
Apr 1, 2004
3,165
0
0
GB
I have a script which resizes several hundred .png images and then displays them in a web page.
My sites are hosted on a shared server and the server keeps reporting 'too many connections'.
My ISP insist I am setting up repeated FTP connections but the script does nothing of the sort.
There are no script errors reported except this 'too many connections' error.
Does a connection have to be an FTP call or could it mean that a module is being called too frequently?
Can anyone suggest what I could do to resolve this?

Keith
 
I would suggest that it is 'crackers' and 'script kiddies' attacking the FTP daemon, one of our servers (shared) has at this moment a little under 500 connections being made to the FTP daemon and there is not one legitimate user in that count.

I just collect the IPs and shut them out at the firewall, the 'big' server operators don't, and the hosting clients get the crappy end of the stick.

Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.
Webmaster Forum
 
Thanks Chris
The problem only seems to occur when I refresh the page myself, a number of times and not all the time.
There is no evidence of failed FTP connections in the logs, just the few I have made when uploading edits as I work.
The ISP techs are looking into it but we still haven't got past the stage of, 'it must be something to with the script because it is Perl'.

Could modules such as file::size and IO::File potentially create hundreds of connections during their operation


Keith
 
Dunno, my Perl coding 'skills' are not much beyond the ubiquitous "Hello World" script and 'tweaking' Spam Assassin plugins, you may have to give Craig (1DMF) a nudge and get his angle on that :)

Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.
Webmaster Forum
 
Hi Keith, Chris,

AFAIK those modules should not be creating FTP connections, these are just file operations.

Could the error actually mean to many open files?

Do you have any code you can share so we can see what the script is actually doing?

I assume the script doesn't download a file from FTP, resize it and then upload it?

"In complete darkness we are all the same, it is only our knowledge and wisdom that separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"
Free Electronic Dance Music
 
Sorry for the delay, been a bit hectic here.
ISP was insisting that there were several hundred FTP connections being made each time the screen was displayed. Despite repeatedly telling them that no FTP functionality was involved they were driving me crazy. Eventually, one of their tech had a look at the script and said that there were too many images being opened at once. I asked him what this had to do with FTP and he quite rightly said, 'nothing'. I explained what the other support folk had being saying and he just made a strange grunting noise.

It seems that the modern shared hosting package cannot handle 500 tiny images on a single page, which I find a bit strange because it worked fine over a dial up connection 20 years ago.

I have reworked the project by using the PHP GD library and combined all the images into a single large one. It works fine so I am a happy bunny.

Keith
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top