jgiam.com

Just another WordPress weblog

Archive for the ‘Techie Corner’ Category

Traffic burst

without comments

Yesterday, I noticed that my website performance was a bit slow. Later that night, websites were not even loading. The server was up, as was LiteSpeed. Turns out some people from China had used my image hosting site to host their animated GIF avatars, ranging from 200 to 600+KB each. On a high traffic forum, this led to a huge spike in traffic due to the huge number of requests. Yesterday’s traffic hit 160GB over 24 hours. Amazingly, LiteSpeed was still handling the requests. I was trying to tweak it so that other websites would not be affected by the lack of connections, but was unable to do so, so I deleted one of the high bandwidth image and went to bed. This morning, I checked the traffic stats and saw that the site pushed traffic of over 160GB over 24 hours, even with one of the images deleted with a third of the day left.

Some thoughts I have now: how to tweak LiteSpeed properly so that one site does not affect the rest; should I stop the image hosting site; or do I keep the site but add some bandwidth/data transfer restrictions?

Update: The users were back at it, pushing 20+Mbps (~2+MB/s) and basically DoS-ing my server. Well, nothing major, just that it was using up all available connections (I’m using the free LiteSpeed). I had to block the China IP range, which brought my server back to normal. Apologies to any legitimate users. I don’t have the time to tweak the server or the site now.

Written by Jon G

December 28th, 2010 at 9:04 am

Posted in Techie Corner

In-car video recorder

without comments

I bought an in-car digital video recorder (DVR) from Carrefour after seeing an advertisement for it. It costs only $138, much cheaper than most other in-car DVRs that I’ve seen. One that I’d been eyeing for the past half year costs almost $200.

The DVR I bought is an unbranded OEM – all it says is “Mini DV High-Definition Video Record” on the box, with no brand or model number. They are sold under different brands and models on Alibaba and elsewhere.

I mounted it beside the rear-view mirror, which gives a good angle of the front, but does not obstruct my view.

There are several things I like about this DVR. Of course, it’s cheap. It supports the latest SDHC cards (some DVRs I know do not support SDHC). I also like that it uses a Nokia compatible battery. One thing I do not like about built-in batteries is that they will go through wear and tear and the batteries will die off over time. The DVR I had been eyeing uses a built-in battery, so my concern was that the $200 gadget would be useless after, say, one year. This DVR I bought uses a rather common Nokia compatible battery, so if the battery dies, I know I can easily buy a replacement. I think this was what motivated me to actually buy the DVR. I thought the motion and audio sensing was pretty neat. What it does is that sound will activate video recording, while motion will activate photo taking. This is a nifty function if you want to record any criminal acts or vandalism to the car.

There’s only one main thing I don’t like about the DVR, and that is the video quality. You can see the videos that I recorded below. Not exactly fantastic video, though good enough for evidence in case of an accident. It’s also not exactly very discreet due to its saucer shape.

Plus points:

  • Cheap
  • Supports SHDC up to 32GB
  • Auto overwrite
  • Motion and audio sensing mode (pretty cool as a surveillance tool)
  • Uses Nokia BL-5C compatible battery
  • Other miscellaneous functions like photo mode, USB flash drive mode, PC webcam

Bad points:

  • Not fantastic video quality
  • Not very discreet (measures ~7.5cm or 3″ across)

Actual video sample (Day time)

Actual video sample (Night time)

Read the rest of this entry »

Written by Jon G

September 27th, 2010 at 9:39 am

Posted in Techie Corner

Tagged with

How not to run a webhosting company

without comments

After getting burnt by my previous webhost, SolidInternet (previously Myacen), I am more cautious when it comes to webhosts. I was with VirtuallyDedicated since November last year, and several things led me to switch to another webhost recently. These are how not to run a webhosting company.

  1. Promise first, don’t deliver.
    VirtuallyDedicated promised me a few times a control panel for my VPS. I didn’t really need a control panel. I just wanted it to be able to tell if my VPS was down by my own fault, or if the node was down, and to reboot my VPS if needed. Yet, I was promised again and again, and no control panel was delivered.
  2. Don’t communicate with your customers. Don’t inform them of downtimes or system failures.
    Throughout the time I was with VirtuallyDedicated, my VPS experienced a few occasions of extended downtime. Extended being in the range of hours. The webhost didn’t bother to inform me nor offer any explanation. Unless I e-mailed them to ask about it. Over time, I just gave up and let the downtimes be, since they were rare.
  3. Let your servers go down for really long, and not only not inform customers, but don’t reply to their e-mails.
    This last one took the cake. My VPS went down for over 24 hours. No word from the webhost. I submitted a support ticket, but did not receive a reply. I directly e-mailed the webhost, and over a day later, received a reply that the downtime was due to a hardware issue and that I didn’t receive a reply because “for some reason tickets were not reaching the support system”. No further explanation, not even why a hardware issue resulted in downtime of over a day.

After that, I simply had enough of VirtuallyDedicated. I decided that for my next webhost, I would go for an established company, one that actually had a real team of technical and support staff. Although there were some negative reviews, I am now on BurstNET. So far, so good. There was an incident where my VPS was performing very slow due to (I suspect) high disk I/O by some other user on the node. But since then, everything is working well and I’m happy with BurstNET.

Written by Jon G

August 15th, 2010 at 10:53 pm

Posted in Techie Corner

HTC Sense (Windows Mobile) quirks

without comments

I’m on Singtel, and my HTC HD2 gets preconfigured with four data networks: SingTel Streaming, SingTel MMS, SingTel WAP and SingTel Internet. If you go to “Settings” > “All Settings” > “Connections” > “Connections” > “Advanced” > “Select Networks”, you can see the list under the heading “Programs that automatically connect to the Internet should connect using:”.

One of the neat features of HTC Sense is the integration with Facebook, YouTube and Flickr. From the HTC Albums, you can easily upload photos to Facebook. If it works. Unfortunately for me, I couldn’t get that feature to work. Instead, I was prompted to login. After typing in my e-mail and password, I got the following “Login error”: “There has been a connection error while attempting to login”. I never figured this problem out until recently. Apparently this is an obscure problem. I came across a forum posting that mentioned trying to change the default data network, so I tried that. To my surprise, I hit the jackpot with “SingTel Streaming”. Once I selected that and tried to login, it worked! I changed the setting back to “SingTel Internet” (the default network), and was able to upload photos from HTC Albums!

I don’t really know the difference between the different Singtel data network settings, and it is quite strange that even though “SingTel Internet” (aka “IDEAS Internet”) is the default connection, HTC Sense is not able to login. This issue was also encountered on a HTC HD mini.

By the way, to manage your accounts in HTC Sense, go to “Settings” > “All Settings” > “Connections” > “Account Manager”, and you will see the login status of Facebook, YouTube and Twitter. Not particularly intuitive.

A side effect of changing the data network was that all of a sudden, my Opera browser could not surf the Internet. Internet Explorer and other applications were fine. Just Opera. Loading any page would immediately display the network error page.

Thanks to a thread from Mobinauts, I found that the solution is to change the following registry key from ’0′ to ’1′:

HKEY_LOCAL_MACHINE\Software\Opera\Prefs\Network
Conn Mgr Auto Detect Network = 1

Apparently Opera is configured to connect only through “SingTel WAP”. Unfortunately, something I did caused the connection to fail. By changing the registry, Opera will use an available data network setting, in this case, “SingTel Internet”.

Perhaps these are more accurately telco (Singtel) quirks, rather than HTC Sense?

Written by Jon G

August 3rd, 2010 at 4:51 pm

Posted in Techie Corner

Tethering Windows Mobile 6 with Ubuntu

without comments

Recently, I was using a laptop with Ubuntu installed. Anticipating that I might not have Wi-fi and needed to tether my Windows Mobile phone for Internet, I installed SynCE. I was in a rush and didn’t have time to really test it other than loading Google (isn’t that the “standard” test for Internet connectivity now? :P ) As it turned out, the place I went to did have Wi-fi access, but I hadn’t installed the Wi-fi drivers for the laptop. To install the Wi-fi drivers, I would need to tether my phone.

Unfortunately I was facing a very strange situation. When I tethered my phone, the laptop did have Internet. But I couldn’t load anything other than the Google home page. I could ping, and I could do nslookup. I could wget the Google homepage consistently. But I couldn’t search or load any other pages. apt-get refused to work as well. I tried to FTP, and discovered that the connection would choke if I tried to do a directory listing of a large directory.

After much trying and Googling, I wondered if it had anything to do with the MTU. I Googled, and came across a forum post that suggested changing the MTU to 1000. I tried it, and… it worked!

I’m now happily tethering my Windows Mobile 6.1 phone with Ubuntu 9.10, using just SynCE + MTU 1000. :)

Written by Jon G

February 3rd, 2010 at 12:19 pm

Posted in Techie Corner

Tagged with ,