Shutdown server

30 views
Skip to first unread message

Anders Persson

unread,
Aug 29, 2018, 4:11:13 AM8/29/18
to Eiffel Web Framework
Hi

I started with the websocket example and would like to shutdown the server gracefully. Which apporach would you recommend?

I was thinking of creating a file that is detected and then initiate the shutdown. Looking for that file regularly. Does it exists any timer that I can modify? I have found this one but that one has a different prupose: on_timer (ws: WEB_SOCKET)

If I want to shutdown the server programmatically, how do I initiate that?

Anders

Larry Rix

unread,
Aug 29, 2018, 2:21:52 PM8/29/18
to eiffel-web...@googlegroups.com
Perhaps run it as a Windows service.

--
--
You received this message because you are subscribed to the Google
Groups "Eiffel Web Framework" group.
 
To post to this group, send email to
eiffel-web...@googlegroups.com
To unsubscribe from this group, send email to
eiffel-web-frame...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/eiffel-web-framework
 
See the site for the Eiffel-Web-Framework project at
https://github.com/EiffelWebFramework/EWF
---
You received this message because you are subscribed to the Google Groups "Eiffel Web Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to eiffel-web-frame...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jocelyn Fiat

unread,
Aug 31, 2018, 7:56:46 AM8/31/18
to eiffel-web-framework
Hi Anders,

In the EiffelWeb Framework websocket example, there is a way to use the `on_timer` to check for external events (in the example, this is checking the presence of a file to quit the websocket, it could be check in a database, etc ...).

Now, if you are running the "standalone" connector, I guess what you mean by "shutdown" the server gracefully is ... really shutdown the executable.
Once I started to build a simple solution, and I stopped looking at this, as often we try to write EiffelWeb code that would work with "standalone", or "libfcgi" or even "cgi", and typically this is not something possible to shutdown gracefully (for instance) Apache from a CGI script (at least I don't know how this could be done).

Now, given this is standalone server, you can try the following class

class
    WEBSOCKET_SERVER_SHUTDOWN_COMMAND

feature -- Operation

    shutdown_server (exec: WSF_EXECUTION)
        do
            if attached exec.request.wgi_connector as conn then
                shutdown_connector (conn)
            end
        end

    shutdown_connector (conn: attached like {WSF_EXECUTION}.wgi_request.wgi_connector)
        do
            if attached {separate WGI_STANDALONE_WEBSOCKET_CONNECTOR [WSF_EXECUTION]} conn as st_conn then
                st_conn.shutdown_server
            end
        end

end

And in your websocket event, use

  ;(create {WEBSOCKET_SERVER_SHUTDOWN_COMMAND}).shutdown_server (Current)

However the server will really shutdown only once it receives a new web request.
That's something that could be improved.
But for now, this code may be good enought for your need.

-- Jocelyn








On Wed, Aug 29, 2018 at 8:21 PM, Larry Rix <rix....@gmail.com> wrote:
Perhaps run it as a Windows service.
On Wed, Aug 29, 2018, 4:11 AM Anders Persson <ander...@gmail.com> wrote:
Hi

I started with the websocket example and would like to shutdown the server gracefully. Which apporach would you recommend?

I was thinking of creating a file that is detected and then initiate the shutdown. Looking for that file regularly. Does it exists any timer that I can modify? I have found this one but that one has a different prupose: on_timer (ws: WEB_SOCKET)

If I want to shutdown the server programmatically, how do I initiate that?

Anders

--
--
You received this message because you are subscribed to the Google
Groups "Eiffel Web Framework" group.
 
To post to this group, send email to

To unsubscribe from this group, send email to

For more options, visit this group at
http://groups.google.com/group/eiffel-web-framework
 
See the site for the Eiffel-Web-Framework project at
https://github.com/EiffelWebFramework/EWF
---
You received this message because you are subscribed to the Google Groups "Eiffel Web Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to eiffel-web-framework+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
--
You received this message because you are subscribed to the Google
Groups "Eiffel Web Framework" group.
 
To post to this group, send email to

To unsubscribe from this group, send email to

For more options, visit this group at
http://groups.google.com/group/eiffel-web-framework
 
See the site for the Eiffel-Web-Framework project at
https://github.com/EiffelWebFramework/EWF
---
You received this message because you are subscribed to the Google Groups "Eiffel Web Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to eiffel-web-framework+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Jocelyn
------------------------------------------------------------------------
Eiffel Software
https://www.eiffel.com
Customer support: https://support.eiffel.com
User group: https://groups.google.com/forum/#!forum/eiffel-users
------------------------------------------------------------------------

Anders Persson

unread,
Aug 31, 2018, 8:16:14 AM8/31/18
to Eiffel Web Framework
Thanks, 

I understand the situation when running in production environment with Appache and but my intention was to use it in my Continouse integration environment to be able to update it automatically. It is correct that I want to stop the executable in this case.
I am not familiar with Appache so it might inlcude other possibilities to upgrade a service in that case. With the standalone I thought that it was the only way to do it.

The limitation with the limitation with on_timer was a reason why I asked about another more general timer class. But I might be able to solve it this way instead by first initiating a shudown with for example a files and then connect to the server to trigger the on_timer feature.

To unsubscribe from this group, send email to
eiffel-web-framework+unsub...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/eiffel-web-framework
 
See the site for the Eiffel-Web-Framework project at
https://github.com/EiffelWebFramework/EWF
---
You received this message because you are subscribed to the Google Groups "Eiffel Web Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to eiffel-web-framework+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
--
You received this message because you are subscribed to the Google
Groups "Eiffel Web Framework" group.
 
To post to this group, send email to

To unsubscribe from this group, send email to
eiffel-web-framework+unsub...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/eiffel-web-framework
 
See the site for the Eiffel-Web-Framework project at
https://github.com/EiffelWebFramework/EWF
---
You received this message because you are subscribed to the Google Groups "Eiffel Web Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to eiffel-web-framework+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jocelyn Fiat

unread,
Aug 31, 2018, 8:48:03 AM8/31/18
to eiffel-web-framework
I understand the situation when running in production environment with Appache and but my intention was to use it in my Continouse integration environment to be able to update it automatically.

Just to be sure ... are you building a CI environment with Eiffel, and you want to use websocket in it ? Then you need a way to stop the CI service with a websocket command ?

Or you are using a CI environment to build/test ... and Eiffel websocket application ?
Then, maybe you need a way to end the test by sending a shutdown websocket message ?
 
It is correct that I want to stop the executable in this case.
I am not familiar with Appache so it might inlcude other possibilities to upgrade a service in that case.
With the standalone I thought that it was the only way to do it.

The limitation with the limitation with on_timer was a reason why I asked about another more general timer class. But I might be able to solve it this way instead by first initiating a shudown with for example a files and then connect to the server to trigger the on_timer feature.

The code I shared is not related to `on_timer` , but it however requires an extra web request to actually complete the server shutdown operation.
So you could send the "shutdown" message , then do a simple "GET http://yourserver/" to complete the shutdown.
(I will look at the implementation to see why it does not complete the shutdown directly, or at least after a specific timeout).

-- Jocelyn

 

For more options, visit this group at
http://groups.google.com/group/eiffel-web-framework
 
See the site for the Eiffel-Web-Framework project at
https://github.com/EiffelWebFramework/EWF
---
You received this message because you are subscribed to the Google Groups "Eiffel Web Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to eiffel-web-framework+unsubscrib...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
--
You received this message because you are subscribed to the Google
Groups "Eiffel Web Framework" group.
 
To post to this group, send email to
eiffel-web...@googlegroups.com

To unsubscribe from this group, send email to

For more options, visit this group at
http://groups.google.com/group/eiffel-web-framework
 
See the site for the Eiffel-Web-Framework project at
https://github.com/EiffelWebFramework/EWF
---
You received this message because you are subscribed to the Google Groups "Eiffel Web Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to eiffel-web-framework+unsubscrib...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Jocelyn
------------------------------------------------------------------------
Eiffel Software
https://www.eiffel.com
Customer support: https://support.eiffel.com
User group: https://groups.google.com/forum/#!forum/eiffel-users
------------------------------------------------------------------------

--
--
You received this message because you are subscribed to the Google
Groups "Eiffel Web Framework" group.
 
To post to this group, send email to

To unsubscribe from this group, send email to

For more options, visit this group at
http://groups.google.com/group/eiffel-web-framework
 
See the site for the Eiffel-Web-Framework project at
https://github.com/EiffelWebFramework/EWF
---
You received this message because you are subscribed to the Google Groups "Eiffel Web Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to eiffel-web-framework+unsubscrib...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Anders Persson

unread,
Aug 31, 2018, 8:55:18 AM8/31/18
to Eiffel Web Framework


Den fredag 31 augusti 2018 kl. 14:48:03 UTC+2 skrev Jocelyn Fiat:
I understand the situation when running in production environment with Appache and but my intention was to use it in my Continouse integration environment to be able to update it automatically.

Just to be sure ... are you building a CI environment with Eiffel, and you want to use websocket in it ? Then you need a way to stop the CI service with a websocket command ?

No I am not
 

Or you are using a CI environment to build/test ... and Eiffel websocket application ?
Then, maybe you need a way to end the test by sending a shutdown websocket message ?

It is one option I am thinking of but would like to avoid, due to that I do not want to expose that possibility. 
  

For more options, visit this group at
http://groups.google.com/group/eiffel-web-framework
 
See the site for the Eiffel-Web-Framework project at
https://github.com/EiffelWebFramework/EWF
---
You received this message because you are subscribed to the Google Groups "Eiffel Web Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to eiffel-web-framework+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
--
You received this message because you are subscribed to the Google
Groups "Eiffel Web Framework" group.
 
To post to this group, send email to
eiffel-web...@googlegroups.com

To unsubscribe from this group, send email to

For more options, visit this group at
http://groups.google.com/group/eiffel-web-framework
 
See the site for the Eiffel-Web-Framework project at
https://github.com/EiffelWebFramework/EWF
---
You received this message because you are subscribed to the Google Groups "Eiffel Web Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to eiffel-web-framework+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Jocelyn
------------------------------------------------------------------------
Eiffel Software
https://www.eiffel.com
Customer support: https://support.eiffel.com
User group: https://groups.google.com/forum/#!forum/eiffel-users
------------------------------------------------------------------------

--
--
You received this message because you are subscribed to the Google
Groups "Eiffel Web Framework" group.
 
To post to this group, send email to
eiffel-web...@googlegroups.com
To unsubscribe from this group, send email to

For more options, visit this group at
http://groups.google.com/group/eiffel-web-framework
 
See the site for the Eiffel-Web-Framework project at
https://github.com/EiffelWebFramework/EWF
---
You received this message because you are subscribed to the Google Groups "Eiffel Web Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to eiffel-web-framework+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Anders Persson

unread,
Aug 31, 2018, 10:34:36 AM8/31/18
to eiffel-web...@googlegroups.com

I see the same behaviour, quoted below. I set the shutdown but the application goes back and waits for a new connection. When I try to connect it shuts down. It does not seem to time out, I waited about an hour until I sent the GET

"The code I shared is not related to `on_timer` , but it however requires an extra web request to actually complete the server shutdown operation.
So you could send the "shutdown" message , then do a simple "GET http://yourserver/" to complete the shutdown.
(I will look at the implementation to see why it does not complete the shutdown directly, or at least after a specific timeout)."





For more options, visit this group at
http://groups.google.com/group/eiffel-web-framework
 
See the site for the Eiffel-Web-Framework project at
https://github.com/EiffelWebFramework/EWF
---
You received this message because you are subscribed to the Google Groups "Eiffel Web Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to eiffel-web-frame...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
--
You received this message because you are subscribed to the Google
Groups "Eiffel Web Framework" group.
 
To post to this group, send email to
eiffel-web...@googlegroups.com

To unsubscribe from this group, send email to

For more options, visit this group at
http://groups.google.com/group/eiffel-web-framework
 
See the site for the Eiffel-Web-Framework project at
https://github.com/EiffelWebFramework/EWF
---
You received this message because you are subscribed to the Google Groups "Eiffel Web Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to eiffel-web-frame...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Jocelyn
------------------------------------------------------------------------
Eiffel Software
https://www.eiffel.com
Customer support: https://support.eiffel.com
User group: https://groups.google.com/forum/#!forum/eiffel-users
------------------------------------------------------------------------

--
--
You received this message because you are subscribed to the Google
Groups "Eiffel Web Framework" group.
 
To post to this group, send email to
eiffel-web...@googlegroups.com
To unsubscribe from this group, send email to

For more options, visit this group at
http://groups.google.com/group/eiffel-web-framework
 
See the site for the Eiffel-Web-Framework project at
https://github.com/EiffelWebFramework/EWF
---
You received this message because you are subscribed to the Google Groups "Eiffel Web Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to eiffel-web-frame...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Jocelyn
------------------------------------------------------------------------
Eiffel Software
https://www.eiffel.com
Customer support: https://support.eiffel.com
User group: https://groups.google.com/forum/#!forum/eiffel-users
------------------------------------------------------------------------

--
--
You received this message because you are subscribed to the Google
Groups "Eiffel Web Framework" group.
 
To post to this group, send email to
eiffel-web...@googlegroups.com
To unsubscribe from this group, send email to

For more options, visit this group at
http://groups.google.com/group/eiffel-web-framework
 
See the site for the Eiffel-Web-Framework project at
https://github.com/EiffelWebFramework/EWF
---
You received this message because you are subscribed to the Google Groups "Eiffel Web Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to eiffel-web-frame...@googlegroups.com.

Jocelyn Fiat

unread,
Aug 31, 2018, 10:47:58 AM8/31/18
to eiffel-web-framework
Ok so you would like a solution to be able to shutdown any EiffelWeb standalone server, without touching the code itself.
For instance, have the server listening to a specific port, and using a specific tool to tell the server to shutdown.
( similar to `apachectl stop` )

i.e switching from an EiffelWeb collection of libraries .. to a real EiffelWeb framework.

If this time I really understood your need, we will think about it and try to find a solution.


For more options, visit this group at
http://groups.google.com/group/eiffel-web-framework
 
See the site for the Eiffel-Web-Framework project at
https://github.com/EiffelWebFramework/EWF
---
You received this message because you are subscribed to the Google Groups "Eiffel Web Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to eiffel-web-framework+unsubscrib...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
--
You received this message because you are subscribed to the Google
Groups "Eiffel Web Framework" group.
 
To post to this group, send email to
eiffel-web...@googlegroups.com

To unsubscribe from this group, send email to

For more options, visit this group at
http://groups.google.com/group/eiffel-web-framework
 
See the site for the Eiffel-Web-Framework project at
https://github.com/EiffelWebFramework/EWF
---
You received this message because you are subscribed to the Google Groups "Eiffel Web Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to eiffel-web-framework+unsubscrib...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Jocelyn
------------------------------------------------------------------------
Eiffel Software
https://www.eiffel.com
Customer support: https://support.eiffel.com
User group: https://groups.google.com/forum/#!forum/eiffel-users
------------------------------------------------------------------------

--
--
You received this message because you are subscribed to the Google
Groups "Eiffel Web Framework" group.
 
To post to this group, send email to
eiffel-web...@googlegroups.com
To unsubscribe from this group, send email to

For more options, visit this group at
http://groups.google.com/group/eiffel-web-framework
 
See the site for the Eiffel-Web-Framework project at
https://github.com/EiffelWebFramework/EWF
---
You received this message because you are subscribed to the Google Groups "Eiffel Web Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to eiffel-web-framework+unsubscrib...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Jocelyn
------------------------------------------------------------------------
Eiffel Software
https://www.eiffel.com
Customer support: https://support.eiffel.com
User group: https://groups.google.com/forum/#!forum/eiffel-users
------------------------------------------------------------------------

--
--
You received this message because you are subscribed to the Google
Groups "Eiffel Web Framework" group.
 
To post to this group, send email to

To unsubscribe from this group, send email to
eiffel-web-framework+unsub...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/eiffel-web-framework
 
See the site for the Eiffel-Web-Framework project at
https://github.com/EiffelWebFramework/EWF
---
You received this message because you are subscribed to the Google Groups "Eiffel Web Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to eiffel-web-framework+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jocelyn Fiat

unread,
Aug 31, 2018, 10:49:37 AM8/31/18
to eiffel-web-framework
Yes we need to look at this issue, and improve the "shutdown" operation.
The server should not wait for ever, when it is being shutdowned.


For more options, visit this group at
http://groups.google.com/group/eiffel-web-framework
 
See the site for the Eiffel-Web-Framework project at
https://github.com/EiffelWebFramework/EWF
---
You received this message because you are subscribed to the Google Groups "Eiffel Web Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to eiffel-web-framework+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
--
You received this message because you are subscribed to the Google
Groups "Eiffel Web Framework" group.
 
To post to this group, send email to
eiffel-web...@googlegroups.com

To unsubscribe from this group, send email to

For more options, visit this group at
http://groups.google.com/group/eiffel-web-framework
 
See the site for the Eiffel-Web-Framework project at
https://github.com/EiffelWebFramework/EWF
---
You received this message because you are subscribed to the Google Groups "Eiffel Web Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to eiffel-web-framework+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Jocelyn
------------------------------------------------------------------------
Eiffel Software
https://www.eiffel.com
Customer support: https://support.eiffel.com
User group: https://groups.google.com/forum/#!forum/eiffel-users
------------------------------------------------------------------------

--
--
You received this message because you are subscribed to the Google
Groups "Eiffel Web Framework" group.
 
To post to this group, send email to

To unsubscribe from this group, send email to

For more options, visit this group at
http://groups.google.com/group/eiffel-web-framework
 
See the site for the Eiffel-Web-Framework project at
https://github.com/EiffelWebFramework/EWF
---
You received this message because you are subscribed to the Google Groups "Eiffel Web Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to eiffel-web-framework+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Jocelyn
------------------------------------------------------------------------
Eiffel Software
https://www.eiffel.com
Customer support: https://support.eiffel.com
User group: https://groups.google.com/forum/#!forum/eiffel-users
------------------------------------------------------------------------

--
--
You received this message because you are subscribed to the Google
Groups "Eiffel Web Framework" group.
 
To post to this group, send email to

To unsubscribe from this group, send email to

For more options, visit this group at
http://groups.google.com/group/eiffel-web-framework
 
See the site for the Eiffel-Web-Framework project at
https://github.com/EiffelWebFramework/EWF
---
You received this message because you are subscribed to the Google Groups "Eiffel Web Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to eiffel-web-framework+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
--
You received this message because you are subscribed to the Google
Groups "Eiffel Web Framework" group.
 
To post to this group, send email to

To unsubscribe from this group, send email to

For more options, visit this group at
http://groups.google.com/group/eiffel-web-framework
 
See the site for the Eiffel-Web-Framework project at
https://github.com/EiffelWebFramework/EWF
---
You received this message because you are subscribed to the Google Groups "Eiffel Web Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to eiffel-web-framework+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Anders Persson

unread,
Aug 31, 2018, 10:55:39 AM8/31/18
to eiffel-web...@googlegroups.com
On Fri, 31 Aug 2018 at 16:47, Jocelyn Fiat <jf...@eiffel.com> wrote:
Ok so you would like a solution to be able to shutdown any EiffelWeb standalone server, without touching the code itself.

Yes
 
For instance, have the server listening to a specific port, and using a specific tool to tell the server to shutdown.
( similar to `apachectl stop` )

Seems correct, but I do not know anything about "apachectl stop".
 

i.e switching from an EiffelWeb collection of libraries .. to a real EiffelWeb framework.

Do not understand what you mean with this.
 


For more options, visit this group at
http://groups.google.com/group/eiffel-web-framework
 
See the site for the Eiffel-Web-Framework project at
https://github.com/EiffelWebFramework/EWF
---
You received this message because you are subscribed to the Google Groups "Eiffel Web Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to eiffel-web-frame...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
--
You received this message because you are subscribed to the Google
Groups "Eiffel Web Framework" group.
 
To post to this group, send email to
eiffel-web...@googlegroups.com

To unsubscribe from this group, send email to

For more options, visit this group at
http://groups.google.com/group/eiffel-web-framework
 
See the site for the Eiffel-Web-Framework project at
https://github.com/EiffelWebFramework/EWF
---
You received this message because you are subscribed to the Google Groups "Eiffel Web Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to eiffel-web-frame...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Jocelyn
------------------------------------------------------------------------
Eiffel Software
https://www.eiffel.com
Customer support: https://support.eiffel.com
User group: https://groups.google.com/forum/#!forum/eiffel-users
------------------------------------------------------------------------

--
--
You received this message because you are subscribed to the Google
Groups "Eiffel Web Framework" group.
 
To post to this group, send email to
eiffel-web...@googlegroups.com
To unsubscribe from this group, send email to

For more options, visit this group at
http://groups.google.com/group/eiffel-web-framework
 
See the site for the Eiffel-Web-Framework project at
https://github.com/EiffelWebFramework/EWF
---
You received this message because you are subscribed to the Google Groups "Eiffel Web Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to eiffel-web-frame...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Jocelyn
------------------------------------------------------------------------
Eiffel Software
https://www.eiffel.com
Customer support: https://support.eiffel.com
User group: https://groups.google.com/forum/#!forum/eiffel-users
------------------------------------------------------------------------

--
--
You received this message because you are subscribed to the Google
Groups "Eiffel Web Framework" group.
 
To post to this group, send email to
eiffel-web...@googlegroups.com
To unsubscribe from this group, send email to

For more options, visit this group at
http://groups.google.com/group/eiffel-web-framework
 
See the site for the Eiffel-Web-Framework project at
https://github.com/EiffelWebFramework/EWF
---
You received this message because you are subscribed to the Google Groups "Eiffel Web Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to eiffel-web-frame...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Jocelyn
------------------------------------------------------------------------
Eiffel Software
https://www.eiffel.com
Customer support: https://support.eiffel.com
User group: https://groups.google.com/forum/#!forum/eiffel-users
------------------------------------------------------------------------

--
--
You received this message because you are subscribed to the Google
Groups "Eiffel Web Framework" group.
 
To post to this group, send email to
eiffel-web...@googlegroups.com
To unsubscribe from this group, send email to

For more options, visit this group at
http://groups.google.com/group/eiffel-web-framework
 
See the site for the Eiffel-Web-Framework project at
https://github.com/EiffelWebFramework/EWF
---
You received this message because you are subscribed to the Google Groups "Eiffel Web Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to eiffel-web-frame...@googlegroups.com.

Anders Persson

unread,
Sep 4, 2018, 6:57:25 AM9/4/18
to Eiffel Web Framework
Hi

I have now a working solution. Short version:

- When the server recieves an http(s) request its first step is to check if it is time to shutdown. It is done by checking if a certain file exists in the file system.

- To stop the server I do 2 http(s) requests

One problem is that if I have a websocket connection running it does not shutdown the server until the websocket is closed.

Jocelyn Fiat

unread,
Sep 4, 2018, 7:06:53 AM9/4/18
to eiffel-web-framework
Ok,

But you need to change the code to support this.
If this solution fits your need, good.

We will try later to add management tool to EiffelWeb standalone connectors.

(side note:
When I said " switching from an EiffelWeb collection of libraries .. to a real EiffelWeb framework. "
I meant that for now, the EiffelWeb project is a collection of Eiffel libraries, and they can be used by any project.
Now, we could add specific tools for EiffelWeb standalone connectors, including predefined locations for specific configuration files, log files, and so on. And tools to manage all this.
Then it becomes more a framework (libraries + specific location for configuration files, and tools to manage all this).
But just ignore this remark, this was almost a private "joke".
)

About
> One problem is that if I have a websocket connection running it does not shutdown the server until the websocket is closed. 

I would need to look again at the implementation, to see what could be done to force persistent connections, and websockets to be closed when server is shutting down.
(of course here we talk about nice shutdown, not "die" or "killed" solution).


For more options, visit this group at
http://groups.google.com/group/eiffel-web-framework
 
See the site for the Eiffel-Web-Framework project at
https://github.com/EiffelWebFramework/EWF
---
You received this message because you are subscribed to the Google Groups "Eiffel Web Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to eiffel-web-framework+unsubscrib...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
--
You received this message because you are subscribed to the Google
Groups "Eiffel Web Framework" group.
 
To post to this group, send email to
eiffel-web...@googlegroups.com

To unsubscribe from this group, send email to

For more options, visit this group at
http://groups.google.com/group/eiffel-web-framework
 
See the site for the Eiffel-Web-Framework project at
https://github.com/EiffelWebFramework/EWF
---
You received this message because you are subscribed to the Google Groups "Eiffel Web Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to eiffel-web-framework+unsubscrib...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Jocelyn
------------------------------------------------------------------------
Eiffel Software
https://www.eiffel.com
Customer support: https://support.eiffel.com
User group: https://groups.google.com/forum/#!forum/eiffel-users
------------------------------------------------------------------------

--
--
You received this message because you are subscribed to the Google
Groups "Eiffel Web Framework" group.
 
To post to this group, send email to
eiffel-web...@googlegroups.com
To unsubscribe from this group, send email to

For more options, visit this group at
http://groups.google.com/group/eiffel-web-framework
 
See the site for the Eiffel-Web-Framework project at
https://github.com/EiffelWebFramework/EWF
---
You received this message because you are subscribed to the Google Groups "Eiffel Web Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to eiffel-web-framework+unsubscrib...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Jocelyn
------------------------------------------------------------------------
Eiffel Software
https://www.eiffel.com
Customer support: https://support.eiffel.com
User group: https://groups.google.com/forum/#!forum/eiffel-users
------------------------------------------------------------------------

--
--
You received this message because you are subscribed to the Google
Groups "Eiffel Web Framework" group.
 
To post to this group, send email to
eiffel-web...@googlegroups.com
To unsubscribe from this group, send email to

For more options, visit this group at
http://groups.google.com/group/eiffel-web-framework
 
See the site for the Eiffel-Web-Framework project at
https://github.com/EiffelWebFramework/EWF
---
You received this message because you are subscribed to the Google Groups "Eiffel Web Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to eiffel-web-framework+unsubscrib...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
--
You received this message because you are subscribed to the Google
Groups "Eiffel Web Framework" group.
 
To post to this group, send email to
eiffel-web...@googlegroups.com
To unsubscribe from this group, send email to

For more options, visit this group at
http://groups.google.com/group/eiffel-web-framework
 
See the site for the Eiffel-Web-Framework project at
https://github.com/EiffelWebFramework/EWF
---
You received this message because you are subscribed to the Google Groups "Eiffel Web Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to eiffel-web-framework+unsubscrib...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Jocelyn
------------------------------------------------------------------------
Eiffel Software
https://www.eiffel.com
Customer support: https://support.eiffel.com
User group: https://groups.google.com/forum/#!forum/eiffel-users
------------------------------------------------------------------------

--
--
You received this message because you are subscribed to the Google
Groups "Eiffel Web Framework" group.
 
To post to this group, send email to

To unsubscribe from this group, send email to
eiffel-web-framework+unsub...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/eiffel-web-framework
 
See the site for the Eiffel-Web-Framework project at
https://github.com/EiffelWebFramework/EWF
---
You received this message because you are subscribed to the Google Groups "Eiffel Web Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to eiffel-web-framework+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Anders Persson

unread,
Oct 27, 2018, 8:07:29 AM10/27/18
to Eiffel Web Framework
Hi

I had 2 problems in my solution to shutdown the server gracefully related to this problem "One problem is that if I have a websocket connection running it does not shutdown the server until the websocket is closed." that I wrote early September.

1. I had to handle that several websocket connection was active,e.g. I could not remove the file in the on-timer feature. since it will be called for each of the active websocket connections. I had to move the removal to the CI environment.

2. I missed to create, in my CI env, one of the files that the server was waiting for. The one that I was waiting for in on_timer.

Anders

Anders Persson

unread,
Nov 3, 2018, 5:13:09 PM11/3/18
to Eiffel Web Framework
Hi

It is still an issue that one need to connect to server, sometimes twice depending on the status of websocket connections, after it has started to shutdown

Anders


Den fredag 31 augusti 2018 kl. 16:49:37 UTC+2 skrev Jocelyn Fiat:
Reply all
Reply to author
Forward
0 new messages