Network share cache

Problem

At work we have an iOS app that is communicating with a windows application. In fact, it communicates to a WAMP (Apache on Windows) server. On the first request, data is being sent, which is then passed to our Windows application. This application creates a PDF report on a network share. This report will then be fetched by the iOS app.

We had a problem though with fetching the content after the process was done creating the PDF. The file was there, but Apache didn’t see it yet, so it returned a 404. We created a workaround by requesting the URL in a for loop to see when the file was available, and then the creation process would end. In the Apache access logs we could see that after retrying for about 10 seconds, the file finally became available to Apache.

Network cache

The webserver is running on a different server as the fileserver. The file is being saved to a location on the file server. So after testing and debugging for a while, we searched how we might improve the performance of the network.

Finally we found this article by Microsoft, which documents some configuration settings that can be set in the registry. I didn’t think this would help, but we tried it anyways.

To my great surprise: it did work! Now the file was already present at the first request that was made by the Apache web server. So our performance increased 10 times.

The settings we added to the registry were:

FileInfoCacheLifetime: set to 1 sec
DirectoryCacheLifetime: set to 1 sec
FileNotFoundCacheLifetime: set to 1 sec

We added this settings on the client machine, so in our case the webserver that is reaching out to the file server. A reboot was not required. The next time we checked, the response was a lot quicker.

So this was a great improvement. We’re not sure yet what the cost of this change is, but since the servers are running on the same virtual platform, I don’t think there will be any downside to this setup. Maybe when you’re on a slow network these settings could make things worse. But for us this really helped.

Hopefully for you too.

Logitech Z-2300 Remote Control Pod fix

TL;DR

If you hear a squeaking sound when you’re using your volume knob, I think it might be the potentiometer that’s broken. I replaced it, and now it works!

My beloved Logitech

The Logitech Z-2300 were my first own computer speakers that I bought. I think I still lived at my parents house. My brother got them first, and they just sounded awesome. I never heard any other computer speaker set sound better than this.

Unfortunately after a few years, the speakers started to make squeaking sounds when I turned the volume knob. Also sometimes one channel failed; I would only hear the left or the right speaker. At this time, Logitech didn’t produce the speakers anymore, so there was no chance of getting them repaired by them.

Replacement control pod

So then of course, you find yourself googling for another solution. The speakers where fine, so it would be such a waste to replace the whole set, just because the volume knob gave up.

The first time I did my research, I found a guy who reverse engineered the thing. Then he designed an improved version of the control pod, which he would sell on ebay. I was almost going to buy this, but with shipping and all, this would cost me over 50 euro’s.

On our local ebay, I found whole sets for the same price as what this replacement pod would cost me.

So this is what I did, I bought a complete set, just to replace the control pod. The other speakers did come in handy though, because I would take them whenever we would go to a party weekend with our friends. I didn’t have to worry anymore if the speakers would get blown up, or flooded in beer.

Meanwhile, I already asked a friend who I knew owned such a set too, if he was still using his set. He wasn’t, so I could get his control pod. It wasn’t until recently though when I got my hands on it, and actually I tried it a few weeks ago.

You can probably guess: same issues.

Schematics found

So eventually I did another round of research, and found this technical guy that took apart the control pod as well and reverse engineered it. He posted his findings in a blog.

I am very interested in electronics, Arduino’s, soldering stuff, but reading this (simple) schematic was a little too complicated for me. If I could order the PCB I would, but the link didn’t work.

In the comments though, the author was kind enough to tell us what potentiometer we would need to replace it.

So I searched on my favorite site AliExpress, and what do you know .. there they were!

For this kind of money I thought I could give it a shot. Well, also because I had two control pods, of which one was already broken anyways. So in this case there wasn’t that much of a risk.

Replacing the POT

To be honest, I did some soldering before, and already had some equipment in home. Not professional stuff, but enough to get me started. My de-soldering techniques are horrible, so I just cut the six legs of the potentiometer on the board. The I cut away the glue with a utility knife.

Then I first started pulling the potentiometer itself, trying not to break the PCB board. Then the potentiometer itself started to break. So I used my pliers to break it apart. There was still some of the potentiometer left on the board, but I stuck my screwdriver under it and started to move it. Eventually the whole thing launched like a rocket.

Now there was room enough. I cut the legs of the potentiometer as high as possible, so that I had enough left on the board to get them with my pliers. Now it was quite easy to de-solder them, because I could pull the remaining legs out one by one while heating it with my soldering iron. I used some de-soldering wick to get the last solder out, and get the holes open again.

I removed some more of that white glue, so make sure the new potentiometer would fit. And it did.

So now it was very easy to solder the new one. Unfortunately I forgot to make a picture of this too, but well, in the end it worked.

This probably won’t solve all the problems with the control pod, but for this kind of money I guess it’s worth a try. It’s also relative easy, because the pod is large, so the item is easy to remove.

Let me know if it worked for you!

Auto update wordpress plugins using WP-CLI

WordPress › Error

There has been a critical error on this website.

Learn more about troubleshooting WordPress.