×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Too Many Connections

Too Many Connections

Too Many Connections

(OP)
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
www.studiosoft.co.uk

RE: Too Many Connections

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

RE: Too Many Connections

(OP)
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
www.studiosoft.co.uk

RE: Too Many Connections

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

RE: Too Many Connections

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

RE: Too Many Connections

(OP)
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
www.studiosoft.co.uk

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close