WSO2 How to set VFS to a scheduled task - wso2

In wso2, VFS running default 5 minutes. I think this is bad for performance. I want VFS running when server is not busy. For example, maybe at 02:00 no body request, then VFS can work. I tried add scheduled task, but it no use. Anyone can tell me how to do this? Thank you very much.

I think your question is related to WSO2 How to set scheduled task? and https://stackoverflow.com/questions/10537190/how-to-vfs-service-exposed-as-a-web-service questions. Seems you want to do the VFS polling on a particular time of the day (scheduled to a non-peak time) or via a web service. But unfortunately I don't think it's possible to plug a CRON expression or a service call to VFS, because of how VFS transport has been implemented. Anyway you can suggest this as a feature request at WSO2 JIRA

What you are suggesting can lead to starvation. If the ESB server is continuously hit with requests, the VFS task will never run. As mentioned in the ESB documentation you can adjust the polling interval by specifying the transport.PollInterval parameter. An example of increasing the polling interval to 30 minutes can look like this in the ESB configuration:
<parameter name="transport.PollInterval">1800000</parameter>

Related

Has Chrome a timeout itself for web service calls?

Before calling a web service from my web app, I set a specific timeout after which if I didnt get any response, the call ends up.
What if I set this timeout to, for instance, 10', is there another timeout after which Chrome does not want to wait for this response?
Thanks
A webservice call is a regular HTTP call, so it's affected by browser settings regarding http.
I suggest you to look these answers :
General purpose answer :
Where can I find the default timeout settings for all browsers?
Chrome focused answer :
https://superuser.com/questions/633648/how-can-i-change-the-default-website-connection-timeout-in-chrome
Unfortunately, AFAIK there is no setting available in Chrome to set the timeout.
Since last answer of the topic, I don't think Google has improved this but you could at least try the registry approach described there :
Create KeepAliveTimeout and ServerInfoTimeout keys in HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\InternetSettings with desired value in ms and check if it helps.
Additionally, very long http calls are not a very good design. If it's an option, it could be interesting to rework the server process and communication method to have some kind of "keep alive ping" on it, for example to display the progress in client browser instead of freezing it for 10 minutes.

Connection closed by target host before receiving the request wso2 esb

I am getting this "Connection closed by target host before receiving the request" due this first system get time out.
But the problem is that we are getting the proper response from second system.
just provide one major problem
after getting the response from second system we are also getting the one more response.
that i am not able to understand.
the arch is
First System ---- > ESB ---->> second system
response
Second system ---->> ESB then we are going the clone
1. send response to first system
2. send request to DSS to log the request.
can you please help in this...
i am using wso2 esb 4.8.1 and i can not change right now it in production.
Regards,
Shachindra Singh
As you explained in your question, it seems connection between the client and the server has timed out. These kind of lagging can be happen due to the back-end slowness or the ESB server contention. Hence Increasing time out settings could be solve this problem.
By default the ESB closes the connection after 60 seconds. So even you increased the client(which send the request)the timeout the problem will not solve.
For your information in WSO2 ESB can set three types of timeouts:
socket timeout - This parameter will decide on the timeout which a
particular http request is waiting for a response.
endpoint timeout - This will help to configure timeout per endpoint.
synapse global timeout - This will decide the maximum time that a
callback is waiting in the ESB for a response for a particular
request.
Please refer below links [1], [2] to find more detailed information about WSO2 ESB Error Handling. Hopefully it will help you to solve the problem.
[1] http://soatutorials.blogspot.com/2015/06/wso2-esb-error-handling-tutorial-part-i.html
[2] https://docs.wso2.com/display/ESB480/Performance+Tuning
Cheers.

Can BAM and CEP monitor requests from client like Zipkin

I am wondering if I can use BAM and CEP to monitor requests from client, and even find the bottleneck of the service.
I found zipkin, a project that could do this, but the base of my application is WSO2, I don't want to get other projects from scratch.
Yes, you can use BAM/CEP for this. If you need real time monitoring you can use CEP and you can use BAM for batch process. From BAM 2.4.0 onwards, CEP features have been added inside BAM also hence you can use BAM and do real time analytics.
What type of services are involved with your scenario? Depends on this you can use already existing data publisher or write new data publisher for BAM/CEP to publish your request details. For example if you are having chain of axis2 webservice calls for a request from client, and you want to monitor where the bottle neck/more time consumed, then you may use the service stats publishing, and monitor the average time take to process the message which will help you to see where the actual delay has been introduced. For this you can use existing service statistics publisher feature. Also BAM will allow you to create your own dashboard to visualize, hence you can customize the dashboard.
Also with BAM 2.4.0 we have introduced notifications feature also which you can define some threshold value and configure to send notification if that cross that threshold value.

Concurrent Connections to wso2 identity server

Currently we are using wso2 4.1.0 version. we are using soap based services authentication admin, entitlements service for getting policy decision , getting claims values. we are using cxf for our webservice clients. when we make calls with 500 concurrent users from a single machine everything works fine. but when we make it to 1000 concurrent users we are seeing a huge response time for these service calls from wso2 is. can you tell if there is any configuration change that we need to make for tuning. we increased the wso2 is axis client no. of connections per host but we still didn't see any improvement. By the way we are using the default configuration of wso2 is out of the box
Thanks
Kishore
There are some places you can improve the performances.
1.Increase the memory setting. you can find it in the wso2server script file in /bin. can u increase default value and see.. such as
-Xms1024m -Xmx2048m -XX:MaxPermSize=1024m
2.Increase max thread pool size in catalina-server.xml file which can find in /repository/conf/tomcat
maxThreads="250"
3.Increase caching timeout value. entitlement.properties file which can find in /repository/conf/security
4.Please check you are not authenticating for each request. You need to call AuthenticationAdmin 1st time and get the cookie and then use cookie for subsequence requests.
Else could do use some Jconsole or Jprofiler and see what is going wrong? Also according to your environment, this can be the max load that one server can handle, then you need to do horizontal scaling. (adding WSO2 Identity Server more instance in a cluster)

Is usage of stream between ESB and BAM asynchronous?

I configured a BAM Server Profile and a stream in order to connect one of my Proxy Services to my BAM, I incorrectly configured the IP adress of my BAM.
When I sent a request to my proxy service, the call failed because the BAM server is not reachable. Does this mean that the exhanges between ESB and BAM is not asynchronous and can imply a failure of my proxy service?
Nicolas, every mediator is synchronous in the chain.
If you want to call the BAM asynchronously, what you need to do is:
1) Use the clone mediator to create an asynchronous thread (Sequential Mediation: NO, Continue Parent: YES). http://wso2.org/project/esb/java/4.0.0/docs/mediators/clone.html
2) In the cloned target do all your async work and place the BAM Agent Mediator.
That way you'll have your mediation working not only safer but also with better performance (since all the transformation you may need while preparing the information to be sent to BAM is happening asynchronously).
No. Although BAM mediator is synchronous as it is a mediator, data sending operation to BAM side is done asynchronously. That means if the BAM server is not reachable due to some reason (e.g., incorrect IP, BAM is not available) ESB still works properly without any problem. Only the message dumping to BAM will fail. That means mediation sequence will function properly with the server not found exception but the message logging will not happen.
During the development time of BAM mediator we considered cloning the entire message and send asynchronously to BAM side but we rejected that idea, as memory cloning will take significant time and processing which will slow down the ESB. But still data sending part (Data Bridge) works asynchronously as mentioned above.