[Progress Communities] [Progress OpenEdge ABL] Forum Post: RE: Invalid state for read: Current state = STATE_ALLOCATED

  • Thread starter Thread starter dbeavon
  • Start date Start date
Status
Not open for further replies.
D

dbeavon

Guest
I think I got to the root cause of the STATE_ALLOCATED errors in the .Net openclient. It appears to have been related to one of the static properties that impact HTTP connections to PASOE. Below are two methods that may be called to adjust the static properties. The first, SetStaticServicePointManagerProperties(), is going to adjust the ServicePointManager in the .Net framework itself. The second, SetStaticOpenClientRunTimeProperties(), is a Progress thing. I think this is documented in the KB somewhere. You will notice below that Progress has an HTTP timeout that is used for PASOE requests via the openclient proxies. /// /// Static values used for HTTP web request clients. /// public static void SetStaticServicePointManagerProperties( int p_DefaultConnectionLimit = 100, bool p_UseNagleAlgorithm = false, bool p_UnlimitedServicePoints = true, int p_MaxServicePoints = 1000) { // Default limit should be at least 10 System.Net.ServicePointManager.DefaultConnectionLimit = p_DefaultConnectionLimit; // Whether to use nagle (delayed packet transmission) System.Net.ServicePointManager.UseNagleAlgorithm = p_UseNagleAlgorithm; // Optional limit on service points if (p_UnlimitedServicePoints) { // 0 means there is no limit to the number of System.Net.ServicePoint objects. System.Net.ServicePointManager.MaxServicePoints = 0; } else { // Specify the maximum System.Net.ServicePointManager.MaxServicePoints = p_MaxServicePoints; } } /// /// Set the open client runtime properties. /// At this time the only change we are making is to the HttpTimeout used for PASOE. /// /// Default to time out after 30 mins. public static void SetStaticOpenClientRunTimeProperties( int p_HttpTimeoutSeconds = 1800) { // Warning! This throws a lot of // ridiculous first-chance exceptions during // the RunTimeProperties static ctor. RunTimeProperties.SetIntProperty( IPoolProps_Fields.HTTP_TIMEOUT, p_HttpTimeoutSeconds); } Hope this helps anyone else running into STATE_ALLOCATED errors. There are a couple Progress KB's about those errors, but they didn't point me to any solutions.

Continue reading...
 
Status
Not open for further replies.
Back
Top