Jump to content
Sign in to follow this  
AeroMaster12

Feature Request - Extending SimConnect Timeout

Recommended Posts

Hi Kiek,

I know this is a nit-pick, but I was wondering if you could consider either extending the SimConnect timeout period (10 seconds) into a range of 15-20 seconds (or make it configurable). I've recently discovered Volanta Premium's auto save feature which allows for quick recovery in the result of a CTD. When Volanta's save functionality is triggered, it puts a lock on the MSFS process, holding it for about 10-20 seconds to save the simulator and aircraft state. 

When this happens, PSXT reports that SimConnect didn't receive a response in time, and waits to reconnect for 30 seconds, which causes a de-spawn of all planes. When connection is established again, the planes do spawn back again one-by-one just fine based on the snapshot file, however the despawn and respawn impacts the immersion and system resources loading planes than if SimConnect has had a longer startup period.

Consider the following log events: Volanta triggers an auto-save at pushback, which then leads to PSXT writing these events in the log (. If the timeout period is lengthened, it might allow for things to continue running without re-running the spawn code path 

Spoiler

 


06:24:27 Live: 47, parked live: 29, parked static: 64
SWA1344  N401WN    LAS->COS SWA B737 =1= AIGAIM_Southwest Airlines Boeing 737-700WL - OC Misc Dome
UAL1609  N37523    DEN->MCO UAL B39M =c= AIGAIM_United Airlines Boeing 737 MAX 9
UAL2550  N38454    LAX->DEN UAL B739 =1= AIGAIM_United Airlines Boeing 737-900ER SSW - OC
SWA223   N8554X    MDW->LAS SWA B738 =1= AIGAIM_Southwest Airlines Boeing 737-800SSW - SN
SWA1973  N734SA             SWA B737 =c= AIGAIM_Southwest Airlines Boeing 737-700WL - Misc Dome
FFT71    N705FR             FFT A321 =c= AIGAIM_Frontier Airlines Airbus A321-200SL - N705FR Ferndale the Pygmy Owl
UAL1609  N37523    DEN->MCO UAL B39M =c= AIGAIM_United Airlines Boeing 737 MAX 9
SWA2665  N8763L             SWA B38M =3= AIGAIM_Southwest Airlines Boeing 737 MAX 8
SWA324   N7861J    LAX->DEN SWA B737 =1= AIGAIM_Southwest Airlines Boeing 737-700SSW
FFT741   N371FR    TPA->DEN FFT A20N =1= AIGAIM_Frontier Airlines Airbus A320-200neo - N371FR Parish & Daisy the Burrowing Owls
SWA1973  N734SA    DEN->MDW SWA B737 =u= AIGAIM_Southwest Airlines Boeing 737-700WL - Misc Dome
KYE4875  N903AR    MIA->ANC KYE B744     cargo (dbase)
DESTINATION_AIRPORT=KSJC
The destination airport is KSJC
N406HF   N406HF    APA->    PVT BE20 =4= AIGAIM_Turbo Air Beechcraft King Air E90 - N900AC
SWA2665  N8763L    DEN->OAK SWA B38M =u= AIGAIM_Southwest Airlines Boeing 737 MAX 8
KYE4875  N903AR    MIA->ANC KYE B744 =1= AIGAIM_Sky Lease Cargo Boeing 747-400ERF - 'N903AR'
JBU97    N2044J    JFK->DEN JBU A21N =1= AIGAIM_jetBlue Airbus A321-200neo - ACF Balloons
N216FR   N216FR    DEN->    FFT A320 =u= AIGAIM_Frontier Airlines Airbus A320-200 - N211FR OC Grizwald the Grizzly Bear
FFT419   N367FR             FFT A20N =c= AIGAIM_Frontier Airlines Airbus A320-200neo - N367FR Austin the Northern Mockingbird
SWA1313  N8607M    BWI->DEN SWA B738 =1= AIGAIM_Southwest Airlines Boeing 737-800SSW - SN
06:34:26 Live: 54, parked live: 31, parked static: 63
FFT419   N367FR    DEN->    FFT A20N =u= AIGAIM_Frontier Airlines Airbus A320-200neo - N367FR Austin the Northern Mockingbird
N406HF   N406HF    APA->BIL PVT BE20 =u= AIGAIM_Turbo Air Beechcraft King Air E90 - N900AC
FFT71    N705FR             FFT A321 =c= AIGAIM_Frontier Airlines Airbus A321-200SL - N705FR Ferndale the Pygmy Owl
FFT2014  N708FR    LAS->CLE FFT A321 =1= AIGAIM_Frontier Airlines Airbus A321-200SL - N708FR Joe Bob the Badger
UAL1609  N37523    DEN->MCO UAL B39M =c= AIGAIM_United Airlines Boeing 737 MAX 9
SWA173   N763SW    DEN->SMF SWA B737 =c= AIGAIM_Southwest Airlines Boeing 737-700WL - Misc Dome
AAL10    N116AN    LAX->JFK AAL A321 =1= AIGAIM_American Airlines Airbus A321-200SL - IAE Transcon
ACA763   C-GVUO    YUL->SFO ACA BCS3 =1= AIGAIM_Air Canada Airbus A220-300 - Wifi dome
Simconnect did not respond for 10 seconds
Reconnecting to MSFS after 30 seconds
06:40:40 parked_updates\KDEN.xml saved
Waiting for MSFS ...
Microsoft Flight Simulator (11.0.282174.999) connected 
User ac title: PMDG 737-700 SWA (N282WN - CB)
User ac model: B737, half wing span: 17.8 meter, category: Large
User ac status: on ground
User aircraft on the ground at KDEN (DEN)
The parking airport is KDEN (DEN)
06:41:06Airport file parked_updates\KDEN.xml will be read
Parking percentage set from airport file: 78
Airport file read from parked_updates\KDEN.xml for Denver Intl, PPG_MSFS-2.1-Feb  2, 2021

 

Share this post


Link to post
Share on other sites
8 hours ago, AeroMaster12 said:

When this happens, PSXT reports that SimConnect didn't receive a response in time, and waits to reconnect for 30 seconds, which causes a de-spawn of all planes. 

No, the de-spawn of all planes is caused by the CTD, PSXT is not removing planes from MSFS after a disconnection with SimConnect  (it does not even have the means for it while there is no connection).

Whether Volanta places these planes back or not, the SimConnect administation is ruined and PSXT really has to reconnect and start all over again.

 

BTW, a CTD of MSFS? I have never had one... 

Share this post


Link to post
Share on other sites

I think you're misunderstanding me when I mentioned CTD as an example; no CTD is happening in this case, I was just describing a consumer need that Volanta's auto save is trying to address. 

Below is a video that shows the behavior that happens here. Whenever Volanta does a save (either automatically or on command) it looks like PSXT actively indicates that SimConnect didn't respond after 10 seconds, and detaches from the process. This forces the simulator to despawn the objects. When connection is re-established, it follows the startup code path. I don't know what's defining the 10 second timeout - is it a SimConnect limitation, or is it defined by PSXT? But if that timeout was extended just a bit longer, I feel like the objects wouldn't despawn.

Hope this helps explain it further

Volanta + PSXT - SimConnect Disconnect - YouTube

 

Share this post


Link to post
Share on other sites

I see, now I understand. You were not talking about a CTD but about an auto save function. Note that during the autosave MSFS is "halted" and SimConnect no longer responds to commands from PSXT. If that takes too long (defined by PSXT), PSXT assumes problems in MSFS (user is restarting MSFS or loading or seting up a new Flight, etc). 

It is easy for me to make the timeout user configurable via a hidden parameter. How long does an autosave normally takes?

 

Edited by kiek

Share this post


Link to post
Share on other sites

That’s correct. I’ve timed saves to take around 12-20 seconds (20 at maximum) on my machine.
 

I think 15 seconds would be a great default value. I’m timing the saving time to be just a tad bit longer than 10 seconds.

If made as an optional parameter, I can fine-tune the duration and report back with an optimal value

Thanks for being so receptive to this!

Share this post


Link to post
Share on other sites

Available now in version 31.12.0.

  • Like 1

Share this post


Link to post
Share on other sites

I've confirmed that extending the timeout has resolved the issue. Thank you again for considering this and implementing it!

I rarely continue to get timeouts at the 15second mark, so I tried bumping it up to 25 seconds. I noticed in the logs, however, is that whenever the value in the `parameters.xml` file is updated, the logs are showing that the setting isn't being honored. Could it still be relying on some hardcoded value rather than using the value in the parameters.xml setting file?

Log.txt

from C:\Users\{UserName}\AppData\Roaming\PSXT_MSFS\parameters.xml
BLOCK_CALLSIGN=
FLIGHTPLANS_FOLDER=
MSFS_INSTALL_PATH=F:\MSFS
COLLISION_USER_GND=true
RANDOM=true
COLLISION_LIVE_PARKED_GND=true
MAIN_WINDOW_X=-1825
MAIN_WINDOW_Y=177
REMOVE_DAYLESS_THRESHOLD=50
REMOVE_FALSE_THRESHOLD=50
SIMCONNECT_TIMEOUT=15
PROGRAM_VERSION=31.12.0
LIVERIES_FOLDER=liveries

Contents of parameters.xml

    <parameter name="SIMCONNECT_TIMEOUT" value="25" />

 

Share this post


Link to post
Share on other sites

You found a bug in the reading of all hidden integer parameters.. oops. 

Thx for letting me know.

Fixed in version 31.12.1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...