Thoughts and Suggestions about NPDS Stability

I know that Matt and others have bemoaned the stability of NPDS on their Newtons and are often frustrated by the reboots triggered by Watcher.

I've been working for the past week trying to get my NPDS server to be a little more stable. As I detailed yesterday, I regenerated a "vanilla" index page and that seemed to help a bit. I ran NPDS all day yesterday on a private LAN and only crashed it twice. Putting it on the open internet caused to to crash with more frequency, but Watcher seemed to get it going again.

So, reflecting on where we are with the NPDS suite, I have a suggestion for those wishing to run NPDS with more stability. I've noticed the Cape Newton is not running the most current versions of the NPDS software and it is one of the most stable. Grant's is running the newest software and his is stable, but he might be the exception ;)

From my experience you cannot beat the following combination of NPDS versions: version 2.106 2.104 of nHTTPd, Notepad Server 2.101 and Setup 2.101. Additionally, you should use Watcher 1.1a1.

Let's take a look at these versions and figure out the strengths and any limitations.

nHTTPd 2.106: This was the version to run for over two years. Paul's release notes indicate, "Fixed the bug that prevented one to post notes with the 'and' sign, URLs and similar stuff" (hey, I logged that one!). This was a very stable release that worked great. It does not include the new SSIs for listing your Notes and does not handle a huge collection of Notes, like on Grant's server. However, I believe Paul Filmer's Newton runs this version of nHTTPd and his site was fairly complex with a large number of "nested" notes.

nHTTPd 2.104: Reading through the NPDS mailing list archives brought back the recollection that this version, and not 2.106, was the most stable. Paul noted, "Changed the NPDS URL. Reworked the finite state machine of the server. Fixed bugs in SSI parsing. The parameter of the SSIs is not the request. Backward compatibility in NPDS 3 is not guaranteed. Fixed other bugs I don't recall about." The drawback is that NPDS cannot serve notes with the "and" sign in them in this version. However, the reports from the NPDS mailing list and personal experience show that this was a very stable release.

Notepad Server 2.101: This version was used for three years. Paul's release notes indicate, "Now serves ink text embedded into notes. Fixed the about box bug (Grant, Wed, 19 Mar 2003 19:26:02 -0700). Fixed a bug about Notes with no name." The inclusion of the ink text serving is important in my book for the sheer geek factor. Again, this version uses the older "NOTES_LIST" SSI but it is quite stable.

Setup 2.101: Again, a two-year version of this package. Paul's notes indicate, "Removed the latency preference controller. This should fix problems when using recent versions of nHTTPd that don't use this latency setting and that don't define them in the preferences. Strengthened the other settings of the Admin and the Security panels to avoid similar bugs in the future."

The most recent versions of the other packages are appropriate to run.

Here are the steps I took to try to determine the most stable setup for NPDS. I wanted to return to the days when my NPDS server would keep serving pages without intervention.

I started by downgrading from 2.107 to 2.106. Unfortunately this version was not stable enough for me. It ran well on a private network but crashed frequently on a public network.

2.104 was much more stable for me. I started by removing the nHTTPd, Notepad Server, Setup, and the Watcher from my Newton and running NPDS Wipe. I reinstalled the versions mentioned above but continued to have some stability issues. Looking at the release notes for nHTTPd, I noticed that version 2.105 fixed bugs related to rotation. I tend to use my Newton in Landscape mode, so I rotated it back to portrait mode.

I also had issues with NPDS being unable to deal with the ethernet card I have been using for years. It would attempt to engage the ethernet driver but would just hang if the "Show NIE slip" was checked in Setup. I reinstalled the driver but NPDS still did not cooperate: when Watcher went to restart the server it would hang on this step. Other packages did not have this issue. I ended up putting a wifi card in the Newton and it worked fine with or without the NIE slip checked. I used StewPot to look at the soup and see what might be happening with the ethernet card that functioned fine until this period of testing but did not come up with any answers. As I said, I've run Wipe so nothing should be preventing it from working. I deleted the Worksite and the Internet Setup associated with the Worksite and re-created them. Subsequently NPDS engages my Ambicom ethernet card without needing the NIE slip to come up.

I let the server run, checking it occasionally. An effective way of loading an NPDS server is to run Grant's package listing SSI script, especially if there are many packages installed on the Newton. My NPDS server was able to generate the formatted list and keep serving without crashing. It ran for just under 11 hours before the Newton became unresponsive. This is much better uptime.

To summarize, these are the steps that I think you should consider if you are having a difficult time keeping your NPDS server running reliably:

1. Note your hit count and uninstall all the NPDS packages currently on your Newton. Run Wipe to get rid of the preferences.

2. Reinstall nHTTPd 2.104, Notepad Server 2.101, Setup 2.101, and Watcher 1.1a1. I noticed that the version of nHTTPd contained in the Mac disk image is 4K larger, so I ended up using this version rather than the package version available from the NPDS site. You may install the most current releases of Date Server, Card Server, Binary Server, and Script Editor.

3. Use the directions for restoring your server's hit count.

4. Configure Watcher to check every 10 seconds. I also have it configured to reboot immediately without displaying the Reboot Dialog.

5. Make sure your Newton is in Portrait mode, not Landscape mode.

With any luck a similar setup should prove to be stable on other people's Newtons.

Comments