Download
We're evolving to serve you better! This current forum has transitioned to read-only mode. For new discussions, support, and engagement, we've moved to GitHub Discussions.

ERR_CONNECTION_REFUSED

  • #8678
    Avatar photo[anonymous]

    I am not a technical person.

    I use hosting on ovh where I only have publii managed sites.

    On one of the sites, after a large upload (a lot of new pages and images), I received a message:
    ERR_CONNECTION_REFUSED

    How to trace the problem?

    #8715
    Avatar photo[anonymous]

    Hi,

    It was a temporary problem? Sometimes such error appears on the server when it has too many connections.

    #8719
    Avatar photo[anonymous]

    This error indicates that the requested port for the IP address is not responding.

    You did not indicate how exactly you get this error so I will make an assumption that will help you to understand more.

    Sometimes there is a real problem such as mentioned above or the service for the port has not started. I find most of the time it is just a temporary condition.

    Generally, this error follows this example.

    I will explain using FTP and Apache as an example. Here is what happens:

    You open your FTP client and connect to your server. You start your upload which is significant and are able to upload your files very fast.

    Your FTP client is making requests on port 21 to the servers IP address. Once the connection is made and the upload started the service daemon (FTP server) first places your data into memory as a buffer between the network connection and the file I/O system. The daemon then creates an I/O request packet and hands them off to the file queue system which uses first in first out (FIFO) to communicate to the file system to open, create, write, read, close or destroy a file. The file I/O system communicates back to the service daemon using interrupts. For example, when the service daemon creates file “open” request and hands it off to the file I/O queue the service daemon thread creates a trigger and goes into a wait state until it receives an interrupt with a completed message and the wait state is removed. The thread is ready to do something else. More I/O perhaps.

    I am an old systems internals engineer and will go a bit further. Bare with me.

    Lets assume your server has a RAID which is a series of disks that appear as one disk to the server. The RAID is using a recovery protocol in case a disk fails that allow the series of disks to continue without presenting an error to the system. More often the type of RAID is a stripped system or mirror which means that a whole lot of I/O between disks occurs at the hardware driver level. For one I/O write request, there can be several writes to disks on the hardware side.

    If you are uploading a lot of files into the buffer, into the file I/O queue, into the I/O file system, and then multiplying the I/O on the hardware level, you are asking the system to do a lot of work.

    Assuming you have enough memory, your buffering is stored in the swap file using the file I/O system.

    Your CPU also uses a compute queue and will swap out processes for higher priority processes and will set the priority to 0. This means that while the service daemon thread is in it’s wait state, it will be swapped out to the process queue until the system creates the interrupt where it’s priority in the process then restored and eventually swapped back into the CPU. And oh yea, the process queue also uses interrupts as well as memory and so on.

    Thrashing of disk hardware can cause greater file I/O delays and interrupt delays, threads swapped out of the CPU etc. There can be clashes in this process at the interrupt level. One interrupt in one service thread can cause an issue with another service thread, for example from FTP to Apache.

    All this means, is that at any point of way from your local computer to your server, there is plenty of opportunity for delays that can cause the service daemon, your FTP server, not answer a call on port 21 or even Apache on port 80, 443.

    Keep in mind that Apache uses the same processes to do it’s work with the same difficulty.

    Fortunately, computers are very fast. The problem is that file uploads, especially using an FTP based protocol, is very intense for the server due to the design of the protocol. FTP is a guaranteed delivery protocol unlike TCP/IP, and requires more work to communicate back and forth and to confirm I/O request completion to make this guarantee. Now add sFTP where the communication is encrypted and has to be decrypted before being processed.

    It is a lot of stuff going on just to upload files. There should be a t-shirt that says “Interrupts Happen”. It is usually an interrupt somewhere that causes this.

    TMI?

    Cheers!!

    #8777
    Avatar photo[anonymous]

    Please ignore … posted in the wrong thread. And I seem not to be allowed to delete my own posts 🙂

    Hey y’all,

    I have the same problem but with a different configuration:

    • MacBook Pro M1 running Ventura
    • Using sftp but with an ssh key
    • Server is a bare metal machine that I administer myself (I’m doing Unix admin stuff for some 25 years now …)

    I have this problem also with sites that worked before this update. What I already checked:

    • Remote path is writable
    • Key file is correct and ssh login is working
    • Don’t use any protocol prefix, just the server’s IP

    Now I’m out of clues.

    Cheers, Sasha

    #8779
    Avatar photo[anonymous]

    I could not deal with the problem, the hosting does not provide support. I quickly moved to another hosting (with the same provider). So far, everything is working.

    #8790
    Avatar photo[anonymous]

    That makes complete sense.

    I was one of the worlds first registered ISP and Webhosts and helped pioneer ISPCon with ISPOne where I was asked by U.S. Robotics to represent their new products worth 1/4 billion dollars in sales in the final 1/4 of the year.

    Many webhosts offer several layers of hosting from shared, dedicated, cluster, cloud, etc. In this, some of the servers are built with saving money in mind to keep down the investment dollars and to limit the cost of obsolescence and replacement. These cheaper shared and dedicated servers will cause the conditions I describes above. They are often limited in memory, CPU, and have slower disks. Today, most have SSDs which are not always as fast as you would assume. These bottlenecks will cause connection problems.

    Congrats of finding a solution!

    Cheers!!