I sporadically get the "A server error has occurred. Retry, or cancel and return to the previous screen" message when I use the Android Market. It happens when I search for apps, (try to) download apps, check downloaded apps, and navigate through the Market's menus.
My wireless also seems to be going to hell. My phone won't find and keep a wireless connection automatically. I find myself forcing the phone to connect to networks it already remembered. If the phone goes to sleep, there's no guarantee it will pick up the same network again. The phone also loses its wireless connection for (what seems like) no reason.
What should I be looking for and doing to fix this?
This is by no means an actual fix for your issue, however since I've had similar problems I'll tell you what worked for me.
First, the market issue. Near as I can tell whenever the market starts off searching on the network, i.e. 3G or EDGE, it'll need a good connection otherwise you'll be "retry'ing" for a while. A good connection also means no interference from WiFi. If you switch to a WiFi connection while searching the market, it'll also take a few tries to connect until it flushes the network data source and the market registers on WiFi. (note, I didn't say when the phone registers on WiFi.) Once the phones primary data source is WiFi you shouldn't be getting any issues connecting to anything save for T-mobiles Visual Voicemail or their completely useless web jump screen.
The 2nd issue, and I'm going through this right now is staying connected to WiFi when the phone sleeps. This only gives me a problem on crappy WiFi setups. Before my awesome wireless router died my phone would not only stay connected, if it would drop it would immediately reconnect. Fast forward to the router I'm using now, it is my old wireless Draft N router that not only pumps out a "noisy" (READ: Full of minor interference) signal, but it's extremely slow at connecting to anything. Since reverting to this router nothing that it's connected to connects well. Do this:
If you have an app on your phone called
WiFi Analyzer, if not get it. Open it up and connect to whatever wireless network you're trying to access data on. Then navigate through the screens. See if the network that you're on is strong, clean, and that the channel is clear. If it's your own wireless network and you're comfortable with making changes to it's broadcasting, use the suggestions that this app tells you to make in regard to channel selection. Also, if it's possible try the phone as close to the router as possible just to see if you're losing any power. Ultimately, and this is true of any wireless device, the better the connection the better the experience.
Let me know what happens.