Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Very Slow Script Executing #4462

Closed
Kyoukazaki opened this issue Jan 24, 2024 · 7 comments · Fixed by #4592
Closed

[Bug]: Very Slow Script Executing #4462

Kyoukazaki opened this issue Jan 24, 2024 · 7 comments · Fixed by #4592

Comments

@Kyoukazaki
Copy link

User story

Very slow script execution

Game

palworld/minecraft

Linux distro

Ubuntu 22.04

Command

command: start, command: stop, command: restart, command: monitor, command: details

Further information

Freshly installed ubuntu server without anything extra running
I only tried it with palworld and minecraft
but ANY command i execute is lagging/hanging/processes slow
./pwserver start/stop/restart takes about 6-10 minutes to execute
i was checking resources if the script actually doing anything but no, CPU was idle, drive was idle..
i dont know how to check what is wrong with the script

Before anyone asks
Yes i am a linux Novice

Relevant log output

Jan 24 15:28:33.758 pwserver: START: PASS: Started LinuxGSM
Jan 24 15:28:33.861 pwserver: START: PASS: Started LinuxGSM
Jan 24 15:28:33.868 pwserver: START: INFO: LinuxGSM version: v24.1.1
Jan 24 15:28:33.869 pwserver: START: PASS: core_exit.sh exiting with code: 0
Jan 24 15:42:01.048 pwserver: STOP: WARN: Unable to get public IP address
Jan 24 15:44:12.124 pwserver: STOP: WARN: Unable to get public IP address
Jan 24 15:44:12.631 pwserver: STOP: INFO: Graceful: CTRL+c
Jan 24 15:44:15.870 pwserver: STOP: PASS: Graceful: CTRL+c: OK: 3 seconds
Jan 24 15:44:15.896 pwserver: STOP: INFO: LinuxGSM version: v24.1.1
Jan 24 15:44:15.898 pwserver: STOP: PASS: core_exit.sh exiting with code: 0

Steps to reproduce

No response

@Kyoukazaki
Copy link
Author

Issue was that my ISP cant/wont connect to ip-api.com

Temporary Solution was Discovered by Dan

as a temporary work around remove this bit of code from lgsm/modules/info_game.sh
image

And Now everything works and Very fast

Thanks again Dan

@MicLieg
Copy link
Contributor

MicLieg commented Feb 7, 2024

Apparently more users are experiencing this bug: https://discord.com/channels/127498813903601664/219535041468956673/1204753801899413524

@rxm96
Copy link

rxm96 commented Feb 7, 2024

I'm experiencing issues with LinuxGSM script executing very slowly. Here's a summary of the troubleshooting steps @MicLieg and I taken:

Connection Tests:

The server is a dedicated machine rented from Hetzner. It was initially working fine until it started experiencing issues after a few restarts and backups.

Ping Test: A ping test to ip-api.com was successful, indicating that there isn't a DNS issue blocking the connection.
PING ip-api.com (208.95.112.1) 56(84) bytes of data. 64 bytes from ip-api.com (208.95.112.1): icmp_seq=1 ttl=251 time=12.7 ms ... 14 packets transmitted, 14 received, 0% packet loss, time 13024ms

Curl Command Test: A test using curl -s http://ip-api.com/json got stuck, suggesting the request to ip-api.com was not completing as expected. A verbose curl (curl -v http://ip-api.com/json) showed that the connection to ip-api.com timed out, indicating a potential network issue or block.
* Trying 208.95.112.1:80... ... connect to 208.95.112.1 port 80 failed: Connection timed out

Tracepath Test: Running tracepath ip-api.com showed that the request left the Hetzner network but received no replies afterward, suggesting that ip-api.com might be blocking my server's IP address.
1?: [LOCALHOST] pmtu 1500 ... 7: ae-3.a02.londen14.uk.bb.gin.ntt.net 16.335ms 8: no reply ... 23: no reply

Conclusion: The troubleshooting indicates that the problem likely lies with ip-api.com blocking my server's IP address, not with DNS or local network issues. It was suggested that I might resolve the issue by requesting a new IP address from Hetzner.

@irobot73
Copy link

irobot73 commented Feb 16, 2024

Can confirm the same:

  1. Ping == OK
  2. Verbose CURL == FAILURE [curl -v http://ip-api.com/json]
*   Trying 0.0.0.0:80...
* connect to 0.0.0.0 port 80 failed: Connection refused
*   Trying :::80...
* connect to :: port 80 failed: Connection refused
* Failed to connect to ip-api.com port 80 after 3 ms: Connection refused
* Closing connection 0
curl: (7) Failed to connect to ip-api.com port 80 after 3 ms: Connection refused
  1. Verbose CURL (using VPN) == OK [curl -v http://ip-api.com/json]
*   Trying 208.95.112.1:80...
* Connected to ip-api.com (208.95.112.1) port 80 (#0)
> GET /json HTTP/1.1
> Host: ip-api.com
> User-Agent: curl/7.81.0
> Accept: */*
> 
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< Date: Fri, 16 Feb 2024 20:13:00 GMT
< Content-Type: application/json; charset=utf-8
< Content-Length: 290
< Access-Control-Allow-Origin: *
< X-Ttl: 60
< X-Rl: 44
< 
* Connection #0 to host ip-api.com left intact
{"status":"success","country":"United States","countryCode":"US","region":"GA","regionName":"Georgia","city":"Atlanta","zip":"30303","lat":33.7557,"lon":-84.3884,"timezone":"America/New_York","isp":"M247 Europe","org":"M247 Ltd Atlanta",...

@MicLieg
Copy link
Contributor

MicLieg commented Feb 16, 2024

Can you verify If you or your host hast some sort of firewall enabled? The last case was solved by disabling some firewall rules.

@irobot73
Copy link

irobot73 commented Feb 16, 2024

Can you verify If you or your host hast some sort of firewall enabled? The last case was solved by disabling some firewall rules.

Good call. Yes, I'm running PiHole (looks like quite a few RULES links I use get 'hit').

It did/was catching the URL & blocking....now whitelisted. Hope it's as easy a 'fix' for others

@kaueraal
Copy link

kaueraal commented Mar 3, 2024

I have the same issue. They seem to block my residential IP block, I cannot even ping them. I have no DNS filter or similar and I verified that the correct ip is resolved via comparing it to several large public resolvers. From my VPS I can successfully use curl, which uses the same resolved IP address for the query.

I resolved the issue for me via overwriting the resolved ip in my dns server, setting it to 127.0.0.1 which refuses the connection. Other users with the same issue can edit their host file or similar.

Either way, the curl command should use a relatively short timeout.

@dgibbs64 dgibbs64 moved this from 🆕 New Issues to 🏗 In Progress in LinuxGSM Backlog May 22, 2024
@dgibbs64 dgibbs64 moved this from 🏗 In Progress to 👀 In Review in LinuxGSM Backlog Jun 11, 2024
@dgibbs64 dgibbs64 added this to the v24.3.0 milestone Jun 11, 2024
@dgibbs64 dgibbs64 linked a pull request Jun 11, 2024 that will close this issue
13 tasks
@dgibbs64 dgibbs64 moved this from 👀 In Review to ✅ Done in LinuxGSM Backlog Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

6 participants