Welcome to MapForums!

Register, sign in, or use Facebook Connect above to join in and participate in the forum.

When you are signed in, this message, the ads in this row, and the red-underlined link ads all go away.

Subscribe to receive our newsletter.
Subscribe Unsubscribe
Results 1 to 9 of 9

server busy problem!

This is a discussion on server busy problem! within the MapPoint Desktop Discussion forums, part of the Map Forums category; Hi , I found a perfect solution on this website to solve the "server busy " error , by closing ...

  1. #1
    Anonymous is offline Senior Member Black Belt
    Join Date
    Jul 2002
    Posts
    5,137

    server busy problem!

    Hi ,

    I found a perfect solution on this website to solve the "server busy " error , by closing all running mappoint processes.

    Dim proc As New Process
    Dim procs As Process()
    Dim i As Integer
    procs = proc.GetProcessesByName("MapPoint")
    If procs.Length = 0 Then Return 'MP wasn't loaded, so return
    For i = 0 To UBound(procs)
    procs(i).Kill()
    procs(i).WaitForExit()
    Next

    This code is only working in VB.NET.

    Can anyone please help to give alternative code in VB6?

    Thanks a lot ,

    wim

  2. #2
    Anonymous is offline Senior Member Black Belt
    Join Date
    Jul 2002
    Posts
    5,137

    Server busy error

    hi

    Can anyone please help to give alternative code in VB6?
    i am also looking for the same..

    Regards,
    Lalit Goyal

  3. #3
    Wilfried is offline Senior Member Black Belt
    Join Date
    Nov 2004
    Location
    Belgium
    Posts
    2,433
    Hi,

    Can anyone please help to give alternative code in VB6?
    In traditional win32 code you can use the similar API calls FindWindow() to find the process window handle and to close it you can post a WM_QUIT message to it with PostMessage().

    However killing the various active Mappoint instances will free up a lot of memory thus making all faster, and therefore less chance to get the 'server busy', so it is not _the_ solution to get rid of it.

  4. #4
    Anonymous is offline Senior Member Black Belt
    Join Date
    Jul 2002
    Posts
    5,137

    The code in C#

    This was an excellent idea.
    I needed the same for my car navigation project, but it is written in C#, so I will post this for you:

    Code:
    Process[] procs;
    procs = Process.GetProcessesByName("MapPoint") ;
    if(procs.Length > 0)
    {
    	for&#40;int i=0;i<procs.Length;i++&#41;
    	&#123;
    		procs&#91;i&#93;.Kill&#40;&#41; ;
    		procs&#91;i&#93;.WaitForExit&#40;&#41;;
    	&#125;
    &#125;

  5. #5
    Wilfried is offline Senior Member Black Belt
    Join Date
    Nov 2004
    Location
    Belgium
    Posts
    2,433
    Hi,

    or even more simple:

    Code:
                Process&#91;&#93; processes = Process.GetProcessesByName&#40;"MapPoint"&#41;;
                foreach &#40;Process proc in processes&#41;
                    proc.Kill&#40;&#41;;
    I also dont think you have to use WaitForExit because the process is killed as it will do same as task manger.
    However be aware that if a user has started an instance of mappoint.exe this one is killed also !

  6. #6
    Anonymous is offline Senior Member Black Belt
    Join Date
    Jul 2002
    Posts
    5,137

    I Hope Next Mappoint fixes the 'Server Busy' BUG

    I too have spent countless Dev hours using mappoint and love it. Recently when incorporating some longer queries, Started getting the 'Server Busy' stuff. Cannot seem to solve it as it is inconsistant. I don't want this message as the query always works and DB connection has it's own diagnostics anyway!! If their is a way to avoid this in VB6 I would be happy.

    Any help very much appreciated

  7. #7
    Wilfried is offline Senior Member Black Belt
    Join Date
    Nov 2004
    Location
    Belgium
    Posts
    2,433
    Hi,

    The 'server busy' msg window comes when the calling (your) application does not respond to windows messages anymore. For example you will have this a lot if you step with the debugger trough the code.

    Cleaning up mappoint.exe is helpfull whilst developping because a lot of time the program will not 'nice' terminating. In final fase it should not be done.

    About the non responsive. If your program has many things to do in a closed loop then it should be into consideration to eather optimize it for speed, or run it in a background thread context. That way to not get the 'server busy' message.

  8. #8
    Anonymous is offline Senior Member Black Belt
    Join Date
    Jul 2002
    Posts
    5,137
    I appreciate the reply. I do understand what is going on. A bit disappointed that this ActiveX control behaves differently than others when intercepting events. Don't get Server Busy when I step through code relating to MSChart for instance.

    Anyway, I did solve the problem by offloading the queries into a second thread context although I am now a little worried about side effects.

    Thanks
    ITview

  9. #9
    Wilfried is offline Senior Member Black Belt
    Join Date
    Nov 2004
    Location
    Belgium
    Posts
    2,433
    Hi,

    Executing the lenghty code in a second thread is indeed the solution. You will have no side effects if the main application dont touch the data until the thread has finished his query.

    a solution could be that the thread post a message to the main thread just before suspending (or destroying). the custom message handler in main thread can handle the data then.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Server Busy
    By Sylvain in forum MapPoint Desktop Discussion
    Replies: 22
    Last Post: 05-07-2014, 07:28 PM
  2. Server is Busy
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 4
    Last Post: 01-18-2005, 04:52 AM
  3. Timer and Server Busy
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 07-07-2004, 03:59 AM
  4. Server Busy Message fix in .Net
    By matnace in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 05-11-2004, 12:48 PM
  5. Server busy ... svchost is 99% CPU
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 10-17-2003, 08:42 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96