Photon Server Does not auto restart my application

Options
Pikker
edited October 2012 in Photon Server
I have downloaded the latest version of photon server 3 and i have setup the server config for my application to allow auto restart but when i rebuild the class library it does not auto detect the rebuild and i have to manually shut down the server and restart the server instance in order to restart my application. Anything im missing here like a function i must call or something?

Comments

  • dreamora
    Options
    sure you overwrite the class library at all? rebuilds of the solutions will not do that as the solutions output folder is not the deployment folder of the server
  • i modified my deploy directory to a bin folder under the application name in the deploy directory in the photon server like lite, mmo demo, etc. so when i rebuild and i hit restart service manually on the server instance it updates but it should auto restart my application if a change is detected from what i understand and it is not doing that.
  • I actually am clicking on Build MonarchApplicationServer not solution btw.
  • Tobias
    Options
    You are sure you build to the right folders, I guess. Check your app config in the PhotonServer.config. It must have the restart attributes set (ForceAutoRestart="true" and WatchFiles="dll;config"). Depending on the restart options, the server might keep the previous version running as long as there are connections.
  • THose are the exact settings i am using:
    <Application
    Name="MonarchApplicationServer"
    BaseDirectory="MonarchApplicationServer"
    Assembly="MonarchApplicationServer"
    Type="MonarchApplicationServer.PhotonServer"
    ForceAutoRestart="true"
    WatchFiles="dll;config"
    ExcludeFiles="log4net.config">
    </Application>
  • also my build directory is setup just like the other applications Deploy/MonarchApplicationServer/bin/ all dll and config files. When i build they automatically go right into that directory so it should be catching them and restarting it.
  • Anyone have an idea? Im using the latest version of the standalone server and i followed some videos from cjr gaming as i was a bit rusty with photon havnt used it in quite a while. Here is the link to those videos he sets up the server config and the file structure in the first 2 videos.

    http://cjrgaming.com/photon_video_tutorials
  • Tobias
    Options
    I just tried this with the LoadBalancing GameServer app. Changed the config (added a space), saved, looked at the log and it started the app in a new domain, while killing the old one.
    Can you try to reproduce this and tell me if this works for you?
    Does your server log say anything at all about starting new domains?
    Maybe your server game code has something in it that prevents being shut down?
  • No the server doesnt even notice any changes its really odd. Could this be an issue because im using parallels? Im using a new macbook pro retina with windows 7 pro running on parallels.
  • Tobias
    Options
    Did you try to reproduce the behavior in Loadbalancing? As described above?
    Parallels should not affect this part.
  • I just attempted it with the load balancing server and same exact behavior its not restarting but if i go restart it manually the changes i made go into effect so its obviously getting the changes.
  • dreamora
    Options
    did you modify the systems configuration to not store timestamps on file updates? Some 'optimization tools' offer that option for 'performance gain'
  • dreamora wrote:
    did you modify the systems configuration to not store timestamps on file updates? Some 'optimization tools' offer that option for 'performance gain'

    Didn't modify anything but to add my application into the server configuration.
  • dreamora
    Options
    Hmm if you didn't disable timestamps on the system itself through some 'system performance optimization tool' or manually through the correspondingly well hidden settings, I'm out of ideas, assuming you do have photon etc on a NTFS partition
  • Tobias
    Options
    Tell us more about your system. OS and runtime of DotNet...
  • OS is win 7 pro 64 bit and Dotnet Runtime is the newest as im using VS 2012 pro. Wonder if its something to do with VS bc i know vs 2012 does not like unity very much and when you try to build a unity project while the project is opened in vs 2012 it causes loads of errors in unity as it seems like it doesn't let go of the assemblies(sort of like trying to rename a file while its open in an application). I have attempted to build and close VS but the server still does not recognize it. I am also using the latest version of Photon server standalone.
  • Tobias
    Options
    Server and Unity?
    You try to share some stuff between server and a Unity project then? Do you build and copy the assemblies then?
    I do build libraries into Unity projects just fine, aside from some issues when Unity and VS are fighting over the solution. Most of the time, it's not a problem.
    So far, there was no clue why your Photon shouldn't restart when a new file is built. Can you try on another system, to check if your setup is broken somehow?
  • No the server and unity project are 100% separated the only idea i have is Visual Studio 2012 Pro is causing the issue because 6 months ago when i last used photon i was able to get the server to auto restart but i was using 2010 pro.
  • Tobias
    Options
    I don't think 2012 can affect the server in a way to not auto-restart. It's a complete mystery for me how this happens.