mod mono server 4 constantly crashes with soap requests - apache

I have a c# Soap service that I have running on my Linux Suse 12.1 VPS server. This has been working fine without problems until I made a small change to the soap service and copied it onto my VPS. I thought it must have been an issue with my change so I rolled back my changes and still not working. Even some methods that haven't been touched are failing.
However, I have tested on my Dev machine which is on windows and is working fine and have also copied the soap interface on to a linux dev machine which is set up in the exact samme way as my VPS, i.e. OpenSuse 12.1 and has all the same stuff as my VPS web server. Both work absolutely fine, not got any problems what so ever.
On the VPS host, however, mod-mono-server is constantly crashing and even though it starts up, the asmx file cannot be read, just displays server error, and I need to run rcapache2 restart to get the test page to load up.
In the apache error log file I have the following:
[Thu Aug 30 20:10:19 2012] [error] (70014)End of file found: read_data
failed [Thu Aug 30 20:10:19 2012] [error] Command stream corrupted,
last command was 1 [Thu Aug 30 20:08:47 2012] [error] Command stream
corrupted, last command was 7
I have no idea what the problem might be, I've tried rebooting the VPS but no difference.
I am using the ASP.net 4 version of mod-mono-server.
Thanks for any help you can provide.
UPDATE 1
I have just noticed something else in the apache error. The log file contains the following
[Thu Aug 30 20:46:31 2012] [notice] caught SIGTERM, shutting down
[Thu Aug 30 20:46:32 2012] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Thu Aug 30 20:46:32 2012] [error] Not running mod-mono-server.exe because no MonoApplications, MonoApplicationsConfigFile or MonoApplicationConfigDir specified.
UPDATE 2
Have just made a discovery, not entirely sure if it helps. The soap service is working fine on the server as long as it doesn't require accessing a mysql database. If it performs a query, it displays an an internal server error 500 within the test page. but if called from PHP it causes it to crash mono. The database is a mysql database and is a local database. There's 34% RAM Free so I don't believe this is a memory issue. I've also emptied the database table to determine if this fixes it if it its something to do with the amount of data, but this hasn't fixed it either.

Thanks to #knocte suggestion I managed to figure out the problem.
When the Soap Service accesses the database it reads a config.xml to determine what username and password to use to access the database, I'm guessing that this config file managed to get corrupted during the transfer. Although I could read it in vi, but maybe there was something that was wrong with the file that stopped the soap service reading the config.
All I did was delete the file and copy and paste the content into the file manually.
For some reason mod-mono when it couldn't access the database it crashes mono, even though all the MySQL stuff within the soap service has MySQL Exception handling. #knocte suggestion of testing the soap service proved useful as when this was used to access the database from the soap service xsp4 would stop but display the error saying that it didn't have permission to access the database, even though it had the correct username and password in the config file.
Once I had re-created the config file the soap service works correctly again.
Thanks for your help.

Related

PHPMyAdmin Internal Server Error - Internal Error or Misconfiguration

I have the latest MAMP Pro and it woks great most of the time.
Besides other development activities I do WordPress Core and Plugin updates on 22 websites. I always run the updates on a local (MAMP) version before updating the Live site to verify that there are no conflicts that might break the website. Every couple of months I refresh my local copy of the website.
5 out of the 22 sites error when importing the database. These aren't large sites so SQL file size isn't the issue.
Here's the error message I get from PHPMyAdmin:
Internal Server Error
The server encountered an internal error or misconfiguration and was
unable to complete your request.
Please contact the server administrator, you#example.com and inform
them of the time the error occured, and anything you might have done
that may have caused the error.
More information about this error may be available in the server error
log.
There was only this error in the Apache Log (no errors in MySQL or PHP logs.)
[Sun Feb 26 11:13:47 2017] [error] [client ::1] FastCGI: comm with
server "/Applications/MAMP/fcgi-bin/php5.6.28.fcgi" aborted: idle
timeout (30 sec) [Sun Feb 26 11:13:47 2017] [error] [client ::1]
FastCGI: incomplete headers (0 bytes) received from server
"/Applications/MAMP/fcgi-bin/php5.6.28.fcgi"
I was wondering if this is an issue with MySQL Version mismatch. The live sites are running Version 5.7.15 but MAMP Pro is back on 5.6.34. Other websites with the same version import OK, but these 5 sites do not.
I'm reasonably competent, but no expert when dealing with server issues. Any help would be appreciated.
Thanks,
David R

Apache error - mod_fcgid: too many processes, skip the spawn request- Hangs Server

We are running a LAMP stack on a Dreamhost dedicated server. Since updating to PHP 5.6 FastCGI we have been getting more frequent server outages and slow response times even with nominal server load. Apache is throwing the following error:
[Tue Jul 14 14:58:09 2015] [error] mod_fcgid: domain=<domain>.com too many /dh/cgi-system/php56.cgi processes (current:20, max:20), skip the spawn request
I have read of some FastCGI configurations that might help, but Dreamhost did not suggest modifying these settings. Would it be safe to update these settings on a Dreamhost server and would this help?
We are planning an audit of all CURL requests to add timeouts. Will this help the issue? Is there something else we can do to stop the php spawn requests from being skipped? Is there a way to identify an offending script that might be hanging the server?

apache mod_fcgid problems

I have a problem on multiple servers than use Apache module mod_fcgid to serve a cgi script that processes the request (ticket validation and similar processing) then serves files on the server based on the result of the processing.
I keep getting the following errors repeatedly in the logs:
[Mon Jan 30 23:11:41 2012] [warn] [client 95.35.160.193] mod_fcgid: error reading data, FastCGI server closed connection
[Mon Jan 30 23:11:41 2012] [warn] [client 95.35.160.193] (32)Broken pipe: mod_fcgid: ap_pass_brigade failed in handle_request_ipc function
[Mon Jan 30 23:13:34 2012] [warn] [client 37.8.52.128] mod_fcgid: can't apply process slot for /var/www/cgi-bin/assetx.fcgi
These problems cause the server to be slow and other times result in service temporarily unavailable error.
The servers have large traffic on them, I have currently configured the following fcgi directives as below:
FcgidMaxRequestsPerProcess 0
FcgidMaxProcesses 300
FcgidMinProcessesPerClass 0
FcgidIdleTimeout 240
FcgidIOTimeout 240
FcgidBusyTimeout 300
the average load on the servers is normal, the number of processes is on average 250 processes.
I have done research for days about this issue, some say it is a permission problem, I've followed their suggestion, didn't help. I tried to tune the parameters above, these are the final values I tried, but they didn't work as well. I am also trying out nginx to be used instead of apache but I cannot find a suitable way to run the cgi script with this high load on the server using nginx.
What can I do to fix this problem?
Your app is dying before Apache can contact it successfully. The answer is to find out why the app is dying.
FastCGI process should never die or quit, even in an error condition. Apache expects FastCGI script to just keep on being there.
You mention you have a cgi script. How did you modify it to support FastCGI?
Usually you need to switch to something like CGI::Fast, remove all calls to die and exit, and refactor your script to run using the CGI::Fast while loop.

Newly Added Files Getting Permissions Error

I'm running a local WAMP server and have just batch-processed a bunch of images in Photoshop, automatically saving them to a directory. When I try to access these images from my browser, I get a 403 error.
This has not yet happened to me on this server, though I have not yet done any batch processing.
I'm running Windows 7 Professional, and I've tried giving full-access to all users across-the-board for these images, but I'm still getting this same Apache error. Here's what my logs look like:
[Tue Sep 27 15:02:37 2011] [error] [client 127.0.0.1] (OS 5)Access is denied. : file permissions deny server access: C:/wamp/www/site/img/4142.jpg, referer: http://site.local/index.html
What am I doing wrong?
Turns out Windows was encrypting these files for some reason. This is what helped me solve this:
I noticed that all my file-names in Explorer were written in Green.
After a bit of digging around, it turns out they were encrypted, so I
turned encryption off on them and everything's good now!
In order to disable decryption, select your files, right-click and go
to properties, and under "General" go to "Advanced" and remove the
tick that says "Encrypt File Contents". The file-names will then turn
back to black, and everything was fine
Source: http://www.wampserver.com/phorum/read.php?2,43642

WebGate Configuration Problem

I have a instance of Oracle Access Manager set up on Server A and a copy of WebGate set up on Apache on Server B which should be working but isn't. When I try to access http(s)://hostname:port/access/oblix/apps/ webgate/bin/webgate.cgi?progid=1 as specified in the directions after everything is set up, I get a web page that says:
No Response from Application Web Server
There was no response from the application web server for the page you requested.
Please notify the site's webmaster and try your request again later.
I get the same error message when accessing other pages which are set up to be protected by WebGate with LocationMatch in Apache's httpd.conf.
Also, I'm not getting any output in webgate/access/oblix/logs/oblog.log even though webgate/access/oblix/conf/oblog_config_wg.xml has the log level set to LOGLEVEL_TRACE.
Does anyone have thoughts on what config files to check that could be causing this problem?
Edit 1: I've found that when I access a page protected by WebGate, the Apache error_log has this:
[Thu Oct 8 09:44:23 2009] [notice] child pid 4970 exit signal Segmentation fault (11)
Edit 2: Also, for some reason, pages which are to be protected by WebGate don't trigger an update to Apache's access_log, even though they do return that error message.
Ah the joy of the webgate install. Here are the usual questions I ask myself:
Does the apache user also own the directory where webgate is installed?
Are you running this on an OS and Apache version verified by Oracle?
Is your httpd.conf correctly setup with the WebGate configs?
Did you put
LD_ASSUME_KERNEL=2.4.19
export LD_ASSUME_KERNEL
in your init.d/httpd file?
Are you clocks in sync between the Access server and the apache host?
Reinstalling Webgate fixed the problem. Not sure what screwed it up.
i got
[2014-03-27T04:41:51.2101+05:30] [OHS] [NOTIFICATION:16] [OHS-9999] [core.c] [pid: 14931] [tid: 139749613860672] [user: root] [VirtualHost: main] child pid 14952 exit signal Segmentation fault (11)
along with
Directory does not exist for read/write [.../oracle/middleware/Oracle_WT1/log] []
in OHS_HOME/network/log/sqlnet.log
After changing file permission of OHS directory appropriately. This issue got resolved for me.