I am having a request splitter in WSO2 ESB, but if i send 4-5 messages i am able to get proper response.
if the request is having lets say around 10-15 messages i am getting unhandled exception saying.
2014-09-09 13:02:50,548 Uncaught exception More
TID[-1234] [ESB] [2014-09-09 13:02:50,548] ERROR {org.apache.axis2.transport.base.threads.NativeWorkerPool} - Uncaught exception org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:296) org.apache.axiom.om.impl.llom.OMSerializableImpl.build(OMSerializableImpl.java:78) org.apache.axiom.om.impl.llom.OMElementImpl.build(OMElementImpl.java:722) org.apache.axiom.om.impl.llom.OMElementImpl.build(OMElementImpl.java:719) org.apache.axiom.om.impl.llom.OMElementImpl.build(OMElementImpl.java:719) org.apache.axiom.om.impl.llom.OMElementImpl.cloneOMElement(OMElementImpl.java:1034) org.wso2.carbon.tracer.module.handler.TracingMessageInObservationHandler.invoke(TracingMessageInObservationHandler.java:33) org.apache.axis2.engine.Phase.invokeHandler(Phase.java:340) org.apache.axis2.engine.Phase.invoke(Phase.java:313) org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:261) org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:167) org.apache.synapse.transport.passthru.ServerWorker.processEntityEnclosingRequest(ServerWorker.java:411) org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:183) org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172) java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) java.lang.Thread.run(Thread.java:744)
any help how to configure Axis Server to have more threads in pool
For cases like Iterator, you can increase thread pool size in synapse.properties (can be found under ESB_HOME/repository/conf/), there you can adjust following properties for better performance
synapse.threads.core = 20
synapse.threads.max = 100
also check if the incoming payload is correct
Related
I'm uploading file to google drive by using service account. And It worked w/o any problem for a while.
And it started giving 500 error from 2 days ago.
W/System.err: com.google.api.client.googleapis.json.GoogleJsonResponseException: 500 Internal Server Error
W/System.err: {
W/System.err: "code" : 500,
W/System.err: "message" : null
W/System.err: }
But there is file uploaded successfully if I go to gdrive account in web and only success usage in console also. ( only 200 responses )
Based on Official Google Documentation '500: Backend Error' is an unexpected error occurred while processing the request. The suggested action is to use exponential backoff.
Exponential backoff is a standard error handling strategy for network applications in which the client periodically retries a failed request over an increasing amount of time. Exponential backoff may be a good strategy for handling those errors.
You may also check this stack overflow related ticket which discuss some other work around: Google Drive uploading file size limit
Well, It's fixed by removing 'thumbnailLink' field. I used to work but started to giving error about a week ago.
From
Drive.Files.Create insert = drive.files().create(fileMetadata, mediaContent)
.setFields("id,mimeType,thumbnailLink,webContentLink,webViewLink");
To
Drive.Files.Create insert = drive.files().create(fileMetadata, mediaContent)
.setFields("id,mimeType,webContentLink,webViewLink");
Just written a web service (WEB-API) that returns a 400 error message on bad request.
Together with the response, the server sends an error message like this:
<?xml version="1.0"?>
<Error>
<Message>The request is invalid.</Message>
<ModelState>
<serviceRequest.Id>The Id field is required.</serviceRequest.Id>
</ModelState>
</Error>
And I use the flash flex for the UI and use the following event handlers to receive the response.
httpStatusHandler: [HTTPStatusEvent type="httpStatus" bubbles=false cancelable=false eventPhase=2 status=400 responseURL=null]
status: 400
[HTTPStatusEvent type="httpStatus" bubbles=false cancelable=false eventPhase=2 status=400 responseURL=null]
This retrieves the status code = 400 but how to receive the accompanying xml from the web service ?
Any pointers are welcome.
Best practice is to always return status OK (200). Flash is a bit dumb on this and mixing headers with content always makes troubles. Nevertheless if you've embedded it to HTML it also depends on the browser.
So best here would be to return a simple OK status with your error inside, and to just check the data on your Event.COMPLETE handler. If you have error, then it's an error. Just skip the status thing - it will save you time, efforts and sleepless nights :)
I am making Windows Phone 8 application and it uses facebook login to identify users. When they first time log in they see facebook login dialog but next time when user starts application login happens on background. That works very well when phone is connected to internet but if i close network and try start application FacebookSessionClient.LoginAsync methdod returns my session normally and application continue it's normal flow. But suddenly i get unhandled exception on my App.cs class.
Here is my stack trace:
$exception {System.Reflection.TargetInvocationException: An exception occurred during the operation, making the result invalid. Check InnerException for exception details. ---> Facebook.WebExceptionWrapper: The remote server returned an error: NotFound. --->
System.Net.WebException: The remote server returned an error: NotFound.
at System.Net.Browser.ClientHttpWebRequest.InternalEndGetResponse(IAsyncResult asyncResult)
at System.Net.Browser.ClientHttpWebRequest.<>c__DisplayClasse.<EndGetResponse>b__d(Object sendState)
at System.Net.Browser.AsyncHelper.<>c__DisplayClass1.<BeginOnUI>b__0(Object sendState)
--- End of inner exception stack trace ---
--- End of inner exception stack trace ---
at System.ComponentModel.AsyncCompletedEventArgs.RaiseExceptionIfNecessary()
at Facebook.OpenReadCompletedEventArgs.get_Result()
at Facebook.Client.FacebookSessionClient.<SendAnalytics>b__0(Object o, OpenReadCompletedEventArgs e)
at Facebook.HttpHelper.OnOpenReadCompleted(OpenReadCompletedEventArgs args)
at Facebook.HttpHelper.ResponseCallback(IAsyncResult asyncResult, Object userToken)
at Facebook.HttpHelper.<>c__DisplayClass2.<OpenReadAsync>b__0(IAsyncResult ar)
at System.Net.Browser.ClientHttpWebRequest.<>c__DisplayClass1d.<InvokeGetResponseCallback>b__1b(Object state2)} System.Exception {System.Reflection.TargetInvocationException
I have tried try catch block many places in my code but i't doesn't stop there. Also when it breaks on app.cs it show that error comes from another thread.
This is how i call facebook login if user is logged before
FacebookSession facebookSession = await App.FacebookSessionClient.LoginAsync();
And it returns immediately and gives current session. But about ten seconds later app crashes. Can anyone give me a hint how i can handle that error correctly or how i can prevent that? I use 0.8 facebook sdk version.
Check this question: Facebook Wrap Exception Wrapper
This is the same bug already fixed in GitHub repo but not yet available via NuGet. The solution to your problem is to build Facebook.Client from source instead of downloading it with NuGet.
I'm trying to upload a 20 meg file using the upload control and it's working fine on visual studio's built in webserver but once I publish it to the production server (which I have no access to) I keep getting the following error :
Server Error in '/' Application.
--------------------------------------------------------------------------------
Maximum request length exceeded.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Web.HttpException: Maximum request length exceeded.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[HttpException (0x80004005): Maximum request length exceeded.]
System.Web.HttpRequest.GetEntireRawContent() +11140903
System.Web.HttpRequest.GetMultipartContent() +72
System.Web.HttpRequest.FillInFormCollection() +245
System.Web.HttpRequest.get_Form() +119
System.Web.HttpRequest.get_HasForm() +11072199
System.Web.UI.Page.GetCollectionBasedOnMethod(Boolean dontReturnNull) +124
System.Web.UI.Page.DeterminePostBackMode() +83
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +270
--------------------------------------------------------------------------------
I've added the following to my system.web node so i don't know what the real issue is.
<httpRuntime executionTimeout="800" maxRequestLength="51200" />
Any direction on this would be very helpful.
If config file change doesn't work, please try to update property httpRuntime executionTimeout="9200" maxRequestLength="200000"> directly from IIS.
For reference:
Although you have a 20Mb file, it is possible that encoding or other content on the page causes the 50Mb limit you have set to be exceeded. I recommend doubling your current setting.
There is also another web.config setting that could come into play: security request filtering maxAllowedContentLength.
This default to 30MB, but could be set differently in your environment.
The web.config entry would be something along the lines of:
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="1550000000" maxQueryString="16384" />
<fileExtensions>
<add fileExtension="." allowed="true" />
</fileExtensions>
</requestFiltering>
</security>
I would like to print the cause of the HTTP Error 500 on my Velocity template but am having difficulty figuring out how this can be done.
My web.xml is configured with:
<error-page>
<error-code>500</error-code>
<location>/error/500</location>
</error-page>
The location is backed by a Spring controller. The 500.vm page is resolving as expected but how do I access the exception which resulted in this error page?
Thanks~
Is this an Avetti App? An http 500 is a 'catch all' type error that can't be determined by the application, so the server relays the message ("stuff is messed up"). This type of error usually happens when an application breaks or didn't properly handle an exception... so there is no exception to catch or present on the page.