Tuesday, March 26, 2013

InfoPath Error: This session has exceeded the amount of allowable resources in SharePoint 2010.


Microsoft Office InfoPath is a software application for designing, distributing, filling and submitting electronic forms containing structured data. InfoPath Forms Services uses session state to store the large amount of transient data generated while filling out a form. As a result, front-end Web servers can remain stateless between round trips, and each post back is not burdened with carrying large amounts of session state information over narrow bandwidth pipes.

One of the users opened a ticket with our team by mentioning that he is getting some error message while opening InfoPath forms:



Error Message: InfoPath Error: This session has exceeded the amount of allowable resources.



It was actually a new issue for me so i had started my troubleshooting by debugging the InfoPath forms.

Checked InfoPath form settings, tried to designed a new form, analyzed SharePoint logs as well as Event viewer. While analyzing the event viewer error messages, i found something which was very useful towards the case resolution. (Please refer the below mentioned trace)

Event Viewer details:

Event Type:      Error
Event Source:    Office SharePoint Server
Event Category:  Forms Services Runtime
Event ID:        5737
Description:    
Number of form actions 208, has exceeded 200, the maximum allowable value
Per request. This value is configurable and can be changed by the administrator.

Another Error in server events

Event Type:       Error
Event Source:    Office SharePoint Server
Event Category: Forms Services Runtime
Event ID:          5736
Date:                3/22/2013
Time:                2:16:20 AM
User:                N/A
Computer:         SPMWPRODWEB1
Description:
Number of postbacks, 76, has exceeded 75, the maximum allowable value per session. This value is configurable and can be changed by the administrator. (User: ABC\Amar, Form Name: Activity Brief Form Template v3.6, IP: , Request: https://abc.xyz.com, Form ID: urn:schemas-microsoft-com:office:infopath:Activity-Brief-Form-Template-v3-6:-myXSD-2009-03-20T03-17-16)

What is postbacks: Some InfoPath form controls, actions, and features require the browser to communicate with the server during a form session. This exchange of data during the session is called a postback, and usually occurs when a form feature has to send data to the server for processing.
This error occurs due to the user (who is filling the form) has exceeded the threshold that was set for the number of postbacks allowed per form session. When this condition occurs, the user session is stopped to protect the server.

Microsoft Note: In order for the session state database to be properly maintained, the SQL Agent must be turned on for the instance of Microsoft SQL Server where session data is stored. If the SQL Agent is not turned on, expired sessions are not automatically expunged from the session table and may eventually pose a storage problem.

As per the data from the event viewer, it states that we need to check something within central administration as "This value is configurable and can be changed by the administrator". When i checked the Central Administration settings then i found what i was looking for.

Resolution:

Increase the form actions in configuring InfoPath services section as mentioned below:-

  • Go to Central Administration of the SharePoint server.
  • Click on Application Management
  • In the section "InfoPath Forms Services"-->select Configure InfoPath Forms Services.
  • In the Number of Actions per Post back, enter some max value around 250 or 300 depends on your project form requirement.
  • There are chances that the error may retain same even after we increase the number of actions per post back. The second thing we have to increase is the value of "Maximum size of form session state" to 8192. By default it is 4092, by increasing it to 8192 the error should go away. 
There is related reference form MS which tasks about Event ID: 5736: http://technet.microsoft.com/en-us/library/ee513119(v=office.14).aspx

If you have any queries/questions regarding the above mentioned information then please let me know.

3 comments:

  1. Thanks for the information. However, one small comment. In your resolution, you write:
    - Click on Application Management

    I believe the step should read
    - click on General Application Settings

    ReplyDelete
  2. Increasing the value of this setting can adversely affect server performance and increase the risk of DoS attacks on the server.

    https://technet.microsoft.com/en-us/library/ee513119(v=office.14).aspx

    But your application structure is such that you need to do this then can implement but on cost of server performance .

    ReplyDelete
  3. You can do this if your application structure is like that, on cost of server performance. See MSDN comment on performance and application venerability of DOs attack

    https://technet.microsoft.com/en-us/library/ee513119(v=office.14).aspx

    Increasing the value of this setting can adversely affect server performance and increase the risk of DoS attacks on the server.

    ReplyDelete