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

Technical Support Request - API Request Timeout Issue with OpenGWAS #69

Closed
Liu2204170108 opened this issue Apr 29, 2024 · 8 comments
Closed

Comments

@Liu2204170108
Copy link

Dear OpenGWAS Support Team,
I am encountering a technical challenge when accessing the OpenGWAS API via R, and despite having a valid JWT token, my API requests are timing out.
image

image

Issue Description:
• When executing the user() function to retrieve user information using my JWT token, I encounter a timeout error. This function is designed to confirm if the token is active and operational for API requests.
• The error message received is: "The query to MR-Base exceeded 300 seconds and timed out. Please simplify the query."
JWT Token Validation:
• I have validated that my JWT is recognized within the R environment using ieugwasr::get_opengwas_jwt() and it returns the expected token string, confirming that my token is correctly recognized.
• However, I am unable to proceed with API calls, specifically when running user(), which should normally return user information associated with the token.
Troubleshooting Steps:
• Confirmed that R acknowledges the JWT and that there are no proxy conflicts within my R environment.
• Verified that there are no firewall or antivirus blockages that could potentially interfere with network requests.
• Attempted to connect via a VPN to rule out any local network restrictions, which allowed web access but the API request still timed out.
• Tested the connectivity and API call outside of RStudio using PowerShell, which resulted in the same timeout issue.
It appears that the issue lies not with the JWT authentication but rather with the server response to the API calls made from R. As my work relies on the API's accessibility for GWAS dataset retrieval, this has become a critical concern.
Could you provide any advice or server-side logs that might shed light on this issue? I am ready to assist in any way necessary to resolve this matter promptly.
Thank you in advance for your attention and assistance.

@JasonQiu
Copy link

Could you please provide your IP address, e.g.
https://ifconfig.me/

@Liu2204170108
Copy link
Author

I have tried using the internet at both my home and workplace, and even with a VPN, none of these connections are working.

My work place IP address is: 128.252.154.4

My home IP address is: 2600:1700:1ff0:edc0:6d60:d9d5:467:6d24

The IP addresses assigned by my VPN are: 2602:fa45:5::50ad or 2602:fa45:5::50fc​​

Thanks so much for your attention and reply!

@JasonQiu
Copy link

There seems to be no connection issue at the moment. However, a few minutes ago I unbanned your IP 128.252.154.4 manually but now it is banned again by the firewall.

It seems like you have been submitting too many variants in a short period of time. Please note that the Allowance strategy is now live and most of the requests will be subject to allowance. https://api.opengwas.io/api/#allowance

The strategy will be reviewed periodically. We endeavour to increase the allowance while not to break our servers. In the meantime, please try to include fewer ids and variants in each request and keep a close eye on your remaining allowance. As suggested in the link above:

Your real-time allowance information is available on your account page, or in the response header (X-Allowance-* and Retry-After) of every request, except for those endpoints of which the cost is 0.

There will be no delay and there is also no specific rule on the number of requests you can make in a period, as long as you are within your allowance.

If you run out of allowance, you will receive the 429 Too Many Requests error or a similar message as response.

  • At this stage you are still safe but should wait until your allowance is reset. Once it's replenished you can resume your work immediately.
  • However, if you ignore it and keep making requests and get too many 429 errors in a row, you will be blocked by the firewall for a quite while, and that would be severe.

@JasonQiu JasonQiu pinned this issue Apr 30, 2024
@Liu2204170108
Copy link
Author

I hope this message finds you well. I am writing to express my sincerest apologies for the recent overload on your server caused by the excessive number of requests I submitted in a short period. Initially, I feared potential network issues might prevent further connections, prompting me to send multiple queries in quick succession.

I now understand that this approach has inadvertently led to my IP, 128.252.154.4, being banned again by your firewall, even after it was previously unbanned. I appreciate the mechanisms in place, such as the Allowance strategy, to protect your infrastructure and I realize my actions were not in alignment with these rules.

My allowance has been reset, but I am currently unable to connect to the server, likely due to the IP ban. Could I kindly ask for your assistance in unbanning my IP address once more? I assure you that moving forward, I will adhere strictly to the request limits and manage my queries more responsibly to avoid any further inconvenience.

Thank you for your understanding and support. I look forward to your favorable response and resuming my work under the guidelines you've provided.

Best regards,
Jia-Chen Liu

@JasonQiu
Copy link

No problem. Unbanned 128.252.154.4 again now.

@passenger98911
Copy link

No problem. Unbanned 128.252.154.4 again now.
I had the same problem, and seeing your reply I understand that I was inadvertently sending too many requests to the server and interfering with the normal operation of the server. I am very sorry for the above behaviour. This practice inadvertently caused my IP 192.168.199.142 to be banned by your firewall again. I appreciate the various mechanisms that your company has put in place to protect the infrastructure, such as the Allow Policy, and I realise that my behaviour was not in line with these rules. As I am new to learning MR, I am deeply sorry for the unintentional use of code requests that have affected you and the operation of your servers, and I kindly ask you to give me another chance to use it in strict adherence to the rules, thank you again.

@15554136938
Copy link

Hello, I am facing the same problem as the above. My IP address is 222.194.63.71. I am very sorry to bother you. Could you please unblock this IP? I will strictly abide by the rules in my future research.

@hhhhadasdsada
Copy link

Hello, I am facing the same problem as the above. My IP address is 192.168.1.117. I am very sorry to bother you. Could you please unblock this IP? Thanks so much for your attention and reply!
Best regards,

@MRCIEU MRCIEU locked as resolved and limited conversation to collaborators Jul 2, 2024
@JasonQiu JasonQiu unpinned this issue Jul 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants