The sticky IP changed before the session ended

You took a sticky IP, and the address changed in the middle of work. There are only a few causes, and most can be seen in the settings: the port, the session duration and how your program picks proxies.

Updated · Prokso editorial team

Key takeaways
  • A sticky IP can change early if the device left the network: the port gets a new IP from the same country
  • Check the port 10000-20000 and the session duration: from 1 to 120 minutes
  • Turn off list rotation in your program and pin a port to each profile

What the error means

At Prokso sticky IPs come from ports 10000-20000: each port holds its address for as long as the "Session duration, minutes" field in the "Pool settings" block on the plan page says - from 1 to 120 minutes, 30 by default. When the time is up, the same port gets a new address. The glossary explains what a sticky session is.

Residential and mobile addresses belong to real devices. If a device leaves the network - the phone lost signal, the router restarted - its address disappears, and the port gets a new IP from the same country. You cannot see this coming in advance.

Causes

  • The device left the network. The most common cause on residential and mobile proxies. The port gets a new IP from the same country.
  • A short session duration. The value in the "Session duration, minutes" field is shorter than your work takes. The default is 30 minutes.
  • Ports 823 or 824 were used. These are rotating ports: a new IP for every request. For one address for the whole session you need a port from 10000-20000.
  • sessid on rotating ports. A session number in the username (sessid) holds one address on ports 823/824 for only about 30 minutes, regardless of the configured session duration.
  • The program switched to another port. An antidetect browser, scraper or proxy manager takes the next line from the list after an error or by its own rotation rule, and gets another port's address.

How to fix it

  1. Check the port in the proxy line: for a sticky IP it is 10000-20000. Ports and username parameters are in the gateway reference.
  2. Open the plan page, the "Pool settings" block, and set the "Session duration, minutes" field with a margin for your task - up to 120 minutes.
  3. If you use sessid on ports 823/824 and your work lasts longer than about 30 minutes, move to a sticky port.
  4. Turn off automatic proxy rotation from a list in your program and pin a port to each profile or account: ten accounts, ten ports.
  5. Build into your script that the address may change: if the connection drops (for example with ECONNRESET), check the IP and continue from where you stopped.

How to check that it works

Send several requests through the same port: curl -x http://USERNAME:PASSWORD@gw.prokso.com:10000 https://prokso.com/ip. The ip field should stay the same until the session duration ends. If the IP changes between neighbouring requests, check the port; if it changes rarely and irregularly, the device most likely left the network.

Two-minute diagnosis

First paste the line into the proxy checker. If the proxy works there, the cause is in your app or its settings. If not, test the line from a terminal:

curl -v -x "http://USERNAME:PASSWORD@gw.prokso.com:823" https://api.ipify.org
  • A < HTTP/1.1 407 line right after CONNECT means the proxy answered. The name after the code, for example NO_USER, points to the cause.
  • The proxy answered CONNECT with 200 and then another code arrived - the proxy works, and that answer came from the website.
  • No answer at all, only a timeout - the connection never reached the proxy: check the host, port and network.

Setup guides where this error comes up

FAQ

Can I get the previous IP back?

No. Once the port has a new address, the previous one cannot be pinned again: the pool is shared.

Will the country change if the device left the network?

No, the port gets a new IP from the same country. The city and carrier may differ if they are not set in the username.

Does a longer session use more traffic?

No. Traffic is counted by the volume of data in both directions, not by how long the address is held.

Residential $1.59, mobile $2.50, datacenter $0.65 per GB

Sign up in a minute, get access right after payment.

Create account