When integrating with other environments using AX 2012 we may get Time out issue for long running select queries or long running objects. these kind of issues or very common in Integrations. To solve these issues we can follow different approaches. the approaches are mentioned bellow.
- Changing the Binding Time out values
- Passing the data through the staging tables.
- Splitting the data into the multiple small scenario.
The main approach is to change the Send Time out (or any time out in binding that causing the issue) in Binding.This can be accomplishes in the web config for AX 2012. This is can be accomplished by opening the inbound port configuration file. go to System administrator > Setup > Service and Application Integration Framework > Inbound Ports, disable the port you want to configure and click the Configure button. The binding configuration (Web.Config) will open in the WCF Client or in a normal Notepad.
The view of the client will be similar to this
The configuration window will be like this if you open it in WCF client.
the time out can be modified here by selecting the binding on the left side pan and then select the Parameter for which you want to increase the time out. let's say Send Time out the text box has values 00:10:00 it follows the hours:Minutes:seconds pattern. if you want to increase the time out to 30 min then you have to apply the value 00:30:00 as shown bellow
This is one way and you can change the AX Client config file also. the client config file can be Located in the drive where it is loadee--> Drive:\Program Files (x86)\Microsoft Dynamics AX\60\Client\Bin directory, fiel name Ax32.exe.config XML Config file.
The file can be opened in Note pad or NotePad++ there you can fine the Bindings and then edit them.
Using Client configuration window:
The client configurations can also be set in the Microsoft Dynamics Ax Configurations. This is the AX tool will help to configure the client. this can be opened from Windows start menu. once the form is opened we need to select the Connection tab and then select he particular configuration and click on configure Services. Then it will open a window there we can edited all the Binding configuration time Outs.
the view will be like this.
we have to select the bindings
and then we have to select he AIF related bindings. there you can set the timeout what you want. to be assure change the Query service binding and GenericDocumentService Binding also.
Passing the data through the staging tables:
If you are fetching the data from different tables by using the Joins some classes or peace of code will take more than 10 min. in this case you could use a staging table to load the data. And my suggestion is create a staging table all fields as string type. when loading the data only convert the values into the strings it will help you when you retrieving the data from the staging table to AIF service.
The staging table will take less than 10 min based on the number of records in that table. if you still face the same time issue then clear the cache on the process, Usage data, Caches. This method will be very useful when you are dealing with a large amount of data, in my case i had 1 Lakh records and with 64 columns in that and sent in XML format.
Splitting the data into the multiple small scenario:
If all the above process are failed then you have to split the data into multiple sets and then you have to return them. this could be more complex design compared with the above solutions. you have to call the different services for different data, or else you have to create conditional XML generation for certain number of records and then you have to call the remaining this could be a complex design.
After all loading the data into the Staging would be the better solution.
The configuration window will be like this if you open it in WCF client.
the time out can be modified here by selecting the binding on the left side pan and then select the Parameter for which you want to increase the time out. let's say Send Time out the text box has values 00:10:00 it follows the hours:Minutes:seconds pattern. if you want to increase the time out to 30 min then you have to apply the value 00:30:00 as shown bellow
This is one way and you can change the AX Client config file also. the client config file can be Located in the drive where it is loadee--> Drive:\Program Files (x86)\Microsoft Dynamics AX\60\Client\Bin directory, fiel name Ax32.exe.config XML Config file.
The file can be opened in Note pad or NotePad++ there you can fine the Bindings and then edit them.
Using Client configuration window:
The client configurations can also be set in the Microsoft Dynamics Ax Configurations. This is the AX tool will help to configure the client. this can be opened from Windows start menu. once the form is opened we need to select the Connection tab and then select he particular configuration and click on configure Services. Then it will open a window there we can edited all the Binding configuration time Outs.
the view will be like this.
and then we have to select he AIF related bindings. there you can set the timeout what you want. to be assure change the Query service binding and GenericDocumentService Binding also.
Passing the data through the staging tables:
If you are fetching the data from different tables by using the Joins some classes or peace of code will take more than 10 min. in this case you could use a staging table to load the data. And my suggestion is create a staging table all fields as string type. when loading the data only convert the values into the strings it will help you when you retrieving the data from the staging table to AIF service.
The staging table will take less than 10 min based on the number of records in that table. if you still face the same time issue then clear the cache on the process, Usage data, Caches. This method will be very useful when you are dealing with a large amount of data, in my case i had 1 Lakh records and with 64 columns in that and sent in XML format.
Splitting the data into the multiple small scenario:
If all the above process are failed then you have to split the data into multiple sets and then you have to return them. this could be more complex design compared with the above solutions. you have to call the different services for different data, or else you have to create conditional XML generation for certain number of records and then you have to call the remaining this could be a complex design.
After all loading the data into the Staging would be the better solution.
No comments:
Post a Comment