• SOAP - Erratic behaviour
    7 replies, posted
Hi everyone! Three months ago, the head developer of Deathgame, which is a Swedish pervasive action game (find a better classification, and I'll buy you a beer), told me that he no longer had the time to develop our website and thus threw the task of finishing it upon my shoulders. At that time, I had very little experience and knowledge of both web design and programming. For two months, I studied some basic C#, tried to get along with CakePHP and finally got to finish the clan system and forum in time for the August round. Unfortunately, the previous developer forgot to pay the invoice for our .org domain, which left us with only the .se domain. And somehow, since this, we have been suffering from a very strange bug. For one month now, I have been trying to hunt it down and fix it. With no success. I'm at my wit's end. Please help us. Okay, here are the details: The website is divided in two parts; the server (server.deathgame.se) and the client (deathgame.se). The server does... pretty much everything, and is written in C#. The client is written in PHP, using the CakePHP framework. Sporadically (sometimes about each twentieth request, and sometimes almost every request), CakePHP shows the visitors a big error message saying "Webservice error: Server failed to send headers". Debug shows that SOAP (which, as the title of this thread suggests, is what the server and the client use to communicate with each other) sometimes gets an empty response (or, at least, NuSOAP debug says "found no headers before EOF after length 0"), which prints this error message. The "server" and the "client" are running on the same machine, a Windows Server 2008 computer with IIS 7.0. On my local test server, which is set up in almost the exact same way (except I'm using IIS 6.1 and Windows 7 x64, this shouldn't be a problem though), everything works. Everything works just fine. This is very embarrassing for us. It's killing the game. We used to have about 800 active players each round, and now we're down to about 50. If I'm to save this game, I really need the website to work. If you're curious to what the game's about, there's a version in English. Just click the British flag icon. I can't guarantee that you'll understand any of it, however. I'm not the one who translated the site, but I should get around to doing it properly, eventually. Link: [url]http://deathgame.se[/url] ...or direct link to non-gibberish version: [url]http://deathgame.se/site/setlanguage/eng[/url] I would dump a lot of information, but I have no idea of what to dump. Please ask me, and I'll give you as detailed information as possible. I have no idea where to start, or where to look, or even what to look for. I'm infinitely grateful for any information or tips of any kind that you might give me. A billion thanks in advance! [editline]06:55PM[/editline] I realise now that I probably should've posted this under "Web Development". Shit. Sorry! [editline]07:14PM[/editline] Thank's for moving the thread, Hexxeh!
What is the address for the endpoint on server.deathgame.se?
Endpoint address? I.. uh... Is that the value of the address attribute for the endpoint elements, under the service elements in Web.config? If that is the case, it's sometimes an empty string ("") and sometimes "mex". It looks the same on my testing server, though. Please excuse my ignorance. Most of this is just magic for me... ='(
Okay, there should be a file called something with *.svc, what is the name of it?
There are 36 service files; ActivityFeedWCF, AdminWCF, ClansWCF, ForumWCF, GameInstanceWCF, GameRoundsWCF, GeoDataWCF, ActivityWCF, MedalsWCF, MurdersWCF, NewsWCF, RulesWCF and UserWCF - each with a .svc file, a .cs.svc file and an interface file (ex. IUsersWCF.cs). The whole project is open source, so you can read the Web.config file here: [url]http://svn2.xp-dev.com/svn/ErikRydeman-deathgame2009server/Deathgame2009Server.View/Web.config[/url] ...and find the source for the entire .NET-server here: [url]http://svn2.xp-dev.com/svn/ErikRydeman-deathgame2009server/[/url] Everything might not be up to date, though. I'll double-check it. Thanks for your help!
I don't have the time / it's too much work for me to setup a local copy of this game at the moment, but some ideas: 1) Can you reproduce this offline on your own computer? Maybe try having a 'burn in test' where you have a script just keep calling the web service by 100 odd connections for 30 minutes and see if it falls over. If you can reproduce the bug; your half way there being able to fix it. 2) You don't have enough information about what's going on. The PHP side is possibly receiving some error from the web service. Are you able to log the stack trace of the PHP errors? For example perhaps the webservice is throwning an exception and thats being returned as webservice data, which is malformed.
[QUOTE=streeter;24790469]I don't have the time / it's too much work for me to setup a local copy of this game at the moment[/QUOTE] That's not what I asked for, but thanks anyway. [QUOTE=streeter;24790469]Can you reproduce this offline on your own computer?[/QUOTE] As I wrote, yes, I have a test server using the same code, set up in the same way as the server (as far as I know, at least), on which everything works fine. This problem never occurs locally. [QUOTE=streeter;24790469]Maybe try having a 'burn in test' where you have a script just keep calling the web service by 100 odd connections for 30 minutes and see if it falls over.[/QUOTE] Thanks! I'll try that. [QUOTE=streeter;24790469]The PHP side is possibly receiving some error from the web service.[/QUOTE] No, sorry. Whenever the server throws an exception, it's always printed out in the client. If I could reproduce the error locally, that would obviously give me the solution. The only problem is, I [I]have[/I] tried doing that for over a month now, with no success. I have also tried gathering friends and spamming the client website with requests to see if it's a multiple user problem. The frequency of this bug was, unfortunately, not greater nor smaller during the test. The only thing I have succeeded in is eliminating possibilities. By now, I've run out of possibilities to eliminate. Which is why I'm currently stuck. I've also ruled out the possibility of this being a internet connection problem. The client and the server appear to be communicating locally, as they should. Any other suggestions?
[QUOTE=Grumbely;24802582]That's not what I asked for, but thanks anyway. [/QUOTE] I mentioned that because I was going to try and reproduce the bug myself. Receiving a blank page is very strange as the response; is anything swallowing exceptions on the C# servers end (and so the web service just returns an empty result instead of a stack trace)? If your running this on Windows, check Event Viewer (start->run->eventvwr) and see if you spot any log messages from ASPNET itself that may be helpful (for example, the appdomain may have crashed and was recycled).
Sorry, you need to Log In to post a reply to this thread.