I'm using the SetDurable option on a custom event request, but once internet connectivity is regained in my testing, I am given a timeout error on the request.
I have set SetMaxQueueTimeInSeconds and SetMaxResponseTimeInSeconds to 30 seconds, but this makes no difference.
My time of testing and re-connecting is only about 10 seconds, so why would the timeout error still occur when the 30 second threshold hasn't been reached yet?
new LogEventRequest().SetEventKey("STORE_PLAYERCUSTOM_DATA")
.SetDurable(true)
.SetMaxQueueTimeInSeconds(30)
.SetMaxResponseTimeInSeconds(30)
.SetEventAttribute("USERNAME", Username)
.Send(() => etc...
Best Answer
O
Oliver Yeung
said
over 7 years ago
Hi Greg,
I've been doing some testing with timeouts and my conclusion is that whatever value you specify through SetMaxResponseTimeInSeconds() gets overridden (or simply not set). While offline, I started a timer when the request is sent and stopped it when I get the timeout error and it was always 5 sec whatever value I put in SetMaxResponseTimeInSeconds().
I noticed that in the PlatformBase.cs file, RequestTimeoutSeconds is set to 5. I tried changing this value to 10 and now my timer was returning 10 sec. My conclusion is that this is the value that GameSparks uses for its timeout duration and that somehow it is not being overridden when SetMaxResponseTimeInSeconds() is called.
You can either edit the value in the PlatformBase Start() function itself or call GS.GSPlatform.RequestTimeoutSeconds = x; from anywhere is your code after GS is initialized.
If I do a Debug.Log of response.Errors.JSON, all I get is
{"error":"timeout"}
Customer Support
said
almost 8 years ago
Hi Greg,
Can you please post the error that you are receiving ?
Thanks,
Liam
G
Greg Quinn
said
over 7 years ago
Liam any update on this?
O
Oliver Yeung
said
over 7 years ago
Answer
Hi Greg,
I've been doing some testing with timeouts and my conclusion is that whatever value you specify through SetMaxResponseTimeInSeconds() gets overridden (or simply not set). While offline, I started a timer when the request is sent and stopped it when I get the timeout error and it was always 5 sec whatever value I put in SetMaxResponseTimeInSeconds().
I noticed that in the PlatformBase.cs file, RequestTimeoutSeconds is set to 5. I tried changing this value to 10 and now my timer was returning 10 sec. My conclusion is that this is the value that GameSparks uses for its timeout duration and that somehow it is not being overridden when SetMaxResponseTimeInSeconds() is called.
You can either edit the value in the PlatformBase Start() function itself or call GS.GSPlatform.RequestTimeoutSeconds = x; from anywhere is your code after GS is initialized.
Hope that will fix your problem.
Oliver
G
Greg Quinn
said
over 7 years ago
I'm using the Unity 5 SDK
G
Greg Quinn
said
over 7 years ago
Thanks Oliver, I have sent your response to GameSparks as an update to my ticket, I will let you know what they say.
O
Oliver Yeung
said
over 7 years ago
No problems.
Also, I've done some tests with SetDurable() and I didn't find any difference between setting it to true or false. All the responses whose request got timed out will be received when connection is reestablished, whether SetDurable() is called with true or false.
J
Jeff Amiel
said
over 6 years ago
"All the responses whose request got timed out will be received when connection is reestablished, whether SetDurable() is called with true or false."
is this true?
B
Baris Tumerkan
said
over 7 years ago
Greg, are you having this issue with the new Unity 5 sdk? I'm using with 3.2, and it works ok for me now.
Oliver, with SetDurable (), the request will persist even if the application is closed.
Greg Quinn
I'm using the SetDurable option on a custom event request, but once internet connectivity is regained in my testing, I am given a timeout error on the request.
I have set SetMaxQueueTimeInSeconds and SetMaxResponseTimeInSeconds to 30 seconds, but this makes no difference.
My time of testing and re-connecting is only about 10 seconds, so why would the timeout error still occur when the 30 second threshold hasn't been reached yet?
Hi Greg,
I've been doing some testing with timeouts and my conclusion is that whatever value you specify through SetMaxResponseTimeInSeconds() gets overridden (or simply not set). While offline, I started a timer when the request is sent and stopped it when I get the timeout error and it was always 5 sec whatever value I put in SetMaxResponseTimeInSeconds().
I noticed that in the PlatformBase.cs file, RequestTimeoutSeconds is set to 5. I tried changing this value to 10 and now my timer was returning 10 sec. My conclusion is that this is the value that GameSparks uses for its timeout duration and that somehow it is not being overridden when SetMaxResponseTimeInSeconds() is called.
You can either edit the value in the PlatformBase Start() function itself or call GS.GSPlatform.RequestTimeoutSeconds = x; from anywhere is your code after GS is initialized.
Hope that will fix your problem.
Oliver
- Oldest First
- Popular
- Newest First
Sorted by PopularGreg Quinn
Hi,
If I do a Debug.Log of response.Errors.JSON, all I get is
{"error":"timeout"}
Customer Support
Hi Greg,
Can you please post the error that you are receiving ?
Thanks,
Liam
Greg Quinn
Liam any update on this?
Oliver Yeung
Hi Greg,
I've been doing some testing with timeouts and my conclusion is that whatever value you specify through SetMaxResponseTimeInSeconds() gets overridden (or simply not set). While offline, I started a timer when the request is sent and stopped it when I get the timeout error and it was always 5 sec whatever value I put in SetMaxResponseTimeInSeconds().
I noticed that in the PlatformBase.cs file, RequestTimeoutSeconds is set to 5. I tried changing this value to 10 and now my timer was returning 10 sec. My conclusion is that this is the value that GameSparks uses for its timeout duration and that somehow it is not being overridden when SetMaxResponseTimeInSeconds() is called.
You can either edit the value in the PlatformBase Start() function itself or call GS.GSPlatform.RequestTimeoutSeconds = x; from anywhere is your code after GS is initialized.
Hope that will fix your problem.
Oliver
Greg Quinn
I'm using the Unity 5 SDK
Greg Quinn
Thanks Oliver, I have sent your response to GameSparks as an update to my ticket, I will let you know what they say.
Oliver Yeung
No problems.
Also, I've done some tests with SetDurable() and I didn't find any difference between setting it to true or false. All the responses whose request got timed out will be received when connection is reestablished, whether SetDurable() is called with true or false.
Jeff Amiel
"All the responses whose request got timed out will be received when connection is reestablished, whether SetDurable() is called with true or false."
is this true?
Baris Tumerkan
Greg, are you having this issue with the new Unity 5 sdk? I'm using with 3.2, and it works ok for me now.
Oliver, with SetDurable (), the request will persist even if the application is closed.
-
Documentation Notes
-
Design issues with user events
-
Using NoSQL
-
Runtime Collections vs Metadata Collections
-
Anonymous authentication from browser app
-
Modules
-
Movement With Unity
-
Problem with url parameters for downloadables
-
Querying NoSql GameSparks database
-
Challenge accesType
See all 2487 topics