Hi Kamal,
There may be various root cause for 500 internal server error.
I'll tell you the root cause which i faced in my project.
For the one synchronous interface PI was successfully sending request to some web based application and were getting response against the request. But for few message response message goes in this error state(internal server error). Root cause was whenever there is data to be sent to PI from web based application message flow successfully but whenever that application was sending fault message structure due to any reason e.g. user doesn't have access to make the request in that application. This fault message structure was not handled in our project hence it went to error state.
So if every thing looks good from your side do check this once also.
Regards
Jitender