It's 2011!

« »
Print

It’s 2011, which means it’s time for a summary / looking forward post! If nothing else, this post will serve as a good reminder few years from now for me on how this site started, and how it got to where it is.

History of slovakcooking.com

making cherry aleSpeaking of how this site has started, here is a bit of history. I’ve been running a personal site iamlubos.com since I don’t even know when. The oldest post I was able to find on it is from 2001 and that sounds about right. Iamlubos.com is place where I started documenting my various hikes and travels, before Facebook became the place to post such info. Yet, even in this day of Facebook, I think that nothing beats a real trip report summarizing your experiences. Photo captions simply don’t cut it for me. Among other things on the site, you will find reports from my journey to climb the highest mountain of every US state. Only Montana remains in the lower 48s. That one, Granite Peak, requires bit of rock climbing, skill I don’t quite possess. So it’s on hold, at least for the next year or so. You will also find reports from my various travels, such as a trip to India, Trans-Siberian journey, and a climb of Kilimanjaro.

As the site grew, I started adding more sections: running (to document few marathons I ran), bike rides (for photos of few motorcycle trips I went on), and also one called “making stuff“. This is where I started posting illustrated guides to making various food items. First, I posted a guide to brewing beer, something I’d been doing at that point for few years. I also tried making chocolate (failed pretty miserably), and then I decided to try making some Slovak dishes. See, although I was not afraid to turn on the stove, I was not much of a cook. Most of my cooking at that time consisted of making Lipton noodles, baking a frozen pizza, making scrambled eggs, or reheating a soup from a can.

The first Slovak dish

The first Slovak dish I remember making was kapustnica and fried fish, two dishes I cooked with my former girlfriend Leslie while I was still living in California. My mom came for a visit one Christmas and this was our way of surprising her. I also made spaghetti carbonara. Although not traditional Slovak dish, this dish is immensely popular in Slovakia – probably since it contains bacon. It’s also very special to me, since it’s what I “carb-loaded” on before running the Košice Marathon.

Anyway, forward about 6 months and I was living back on the east coast in northern Virginia. I moved back for grad school, which is still my present state of life. I’ve got about a year left before I defend my PhD in Aerospace Engineering from the George Washington University on a topic having to do with numerical studies of ionized gases (plasmas). The making stuff section on iamlubos.com has been looking quite lonely, with only two posts, so I decided to recreate those two dishes I’ve made before: spaghetti carbonara and kapustnica.

Well, it shortly occurred to me that this the way the opposite will happen soon, and that this section will soon be nothing but Slovak recipes. So on April 18th, 2009 I completely spontaneously went on GoDaddy.com, the site used to register and host iamlubos.com. I went to their domain name search field, and typed in slovakcooking.com. I expected the site to be taken already. I mean, this name seems like a very popular combination, something that domain resellers would surely grab by now.

Turns out it wasn’t. Slovakcooking.com was available, and I grabbed it right away.

WordPress

The next dilemma was how to actually put content online. Iamlubos.com is as simple a site as they come. It’s completely written in html, there is no server side scripting, no databases, nothing. Each page exists as its own independent entity. Simple, but not very flexible, as making changes to the site would require rewriting every single page. Quite a daunting task!

I wanted to do better with this site, and at first, I thought about writing my own simple content management system (before I knew it was called such). However, I started hearing about this thing called WordPress, so I figured I give it a try. GoDaddy automated the installation of WordPress on the site, making it super simple to get going.

The beauty of WordPress is that it gives you as much or as little direct access as you want. WordPress is a layer which wraps your content (the blog posts, recipes) in a certain template, which gives the site it’s design. There are thousands of templates available on the Internet, allowing you to completely customize the look of your site.

But if you feel like going under the hood, you can totally do that too. I spend my day programming – my research laboratory basically consists of a computer into which I program equations that control the motion of electrons and ions. So it didn’t take too long before I picked up the basics of PHP, the scripting language WordPress runs on. I started customizing the Heatmap theme this site was using to give it a more personal look.

Recipes!

And of course, I continued cooking. I hope you gathered by now that I am not a professional chef. I am simply a guy who got tired of eating sandwiches and pizza, who also started to miss the simple, old-school way of life, when people lived more in harmony with their environment. However, I do like eating (who doesn’t?) and I find cooking quite relaxing. I guess it’s because I spend the whole day behind a computer, so cooking is something I get to do with my hands.

This site is basically a diary of what I eat. Whenever I cook some new Slovak dish, I snap photos and post them online. Nothing revolutionary. However, I am very happy that so many people find this interesting. Slovak cuisine is definitely not well known in the world, so I am happy to do my little part in letting more folks know about our culture, traditions, and the country in general.

First large batch of food

This site has also helped me learn a ton about Slovakia. Slovakia, despite being really tiny, has indeed a very diverse culture, with traditions and cuisine varying almost from village to village. This is why I very much like when you post comments on the recipes. The way I made the dish is surely just one of many different ways of preparing the specialty.

SlovakCooking.com has also helped me get in touch with a ton of awesome Slovak Americans. The first main event was cooking sauerkraut soup for a large dinner at Slovak embassy in December 2009. I remember sitting in my office at NASA (I work part time at Goddard Space Flight Center), and receiving an email from Kathryn Tatko from Slovak American Society of Washington asking if I would be interested in cooking for their 100-person St. Nicholas dinner held at the embassy.

My first reaction was, you gotta be kidding me, I am not a chef! But I showed the email to few of my coworkers/friends (Alex, Dave and Rob) and they all persuaded me to at least give it a shot. So I told Kathryn that there is no way I am up to preparing the main course, but I can at least cook the soup. That was my first time ever cooking such a large quantity of food. It turned out great, and I am really thankful for the chance and the nudge from friends.

Festivals

Around this time I also started talking with Igor Mikoláška from Slovak Chicago. Igor is another 30-something guy that I “met” (in cyberspace) through our mutual friend Tatiana Orlická, who used to work for the USZZ, Slovak government institution supporting Slovak expat activities abroad. Igor was receiving funding from the office for a Slovak festival in Chicago, and Tatiana though we should get in touch with each other.

I am glad we did. Igor asked me to come out and help with the festival, where I did a Slovak cooking lesson. It was a fairly small event, but was a lot of fun, as I got to visit Chicago, and also my friends Mike and Allie came down from Wisconsin. It also spring boarded me to another festival, the Pittsburgh Slovak Heritage Festival, where I did another Slovak cooking lesson. This one was a huge hit, with whole lot more people trying to attend than the kitchen could hold! The festival was also great, as it was also my first time to Pittsburgh.

Sweepstakes

Seeing how much interest there was in Slovak culture at the festival got me thinking that I should perhaps offer some sweepstakes to let people try Slovak food. I think one of the reasons why Slovak food is so unknown is because there simply is no place to try it. There are few Slovak restaurants in the US if you are lucky enough to live in New York City or Chicago. Outside those two metro areas, and you are pretty much out of luck. So I ended up running sweepstakes for a dozen of assorted Slovak Christmas cookies. The sweepstakes was a big hit. It was open only for a week, but over 600 people entered. The leftover cookies also made for good Christmas presents for my friends and coworkers.

December 2010 was also a good month for the site. The highest ever daily traffic count was back on December 6th, 2009, when my potato pancake recipe became really popular on Stumble Upon and almost 5000 visitors visited in a single day. However, these stumblers don’t spend much time on the site. One quick glance and they are gone with the wind. After few days, the traffic count dropped to about 200 a day.

The traffic count continued to climb, but quite gradually. It wasn’t until this December when the site started seeing some more noticeable daily traffic. The number of monthly visitors this past December spiked to 20,000, or 645 people a day on average. Unlike the Stumble Upon traffic, these were people actually looking for info on Slovak recipes. The average number of pages seen by a visitor was about 4, as opposed to just a decimal fraction above 1 for the stumblers a year ago.

Database Problems

traffic sources to slovakcooking.comHowever, at this time the website also started experiencing some performance issues. I’ve been trying to get the site loaded as quickly as possible, but it seemed that despite of all my efforts, the site just kept getting slower and slower. On many occasions, it would take over a minute simply trying to access the admin screen through which you post new recipes. Loading a recipe would take a similar amount of time.

Things started seriously going down hill in December. On many occasions, the site became completely inaccessible. Type in slovakcooking.com in your browser bar, and after a minute or two, Chrome, Firefox or Internet Explorer would give you a generic message that the site could not be displayed (connection reset by server was the most common message).

This to me seemed clearly like a hosting issue. Do a quick Google search on GoDaddy.com and let’s just say that the reviews that you’ll find will be less than flattering. Although I’ve never had any issues with GoDaddy while hosting iamlubos.com, I started becoming one heck of a disgruntled customer! Over the span of the month, I’ve exchanged over a dozen emails with the tech support folks. The emails usually consisted of me saying the site is down again, and GoDaddy tech support claiming that everything is working fine.

I’ve been using performance monitors such pingdom, Page Test, and Web Site Optimization to measure the performance of the site. The first two of these show you a breakdown of the events taking place as the page loads. The first event, the simple connection to the site and waiting for data to be sent in, usually contained a gap ranging between 2 and 8 seconds when nothing happened. The site was just twiddling its thumbs, so to speak.

There was clearly something wrong, despite what GoDaddy claimed. SlovakCooking.com was hosted under a basic shared hosting plan. It’s mere 4 bucks a month, but your site sits on the same computer with about 4000 other sites. If few of them start receiving sufficient traffic, they can pretty much bring down the rest of the server.

So I decided to upgrade to the Deluxe Grid plan. Under this plan, the site sits on a supercomputer consisting of a large number of servers which can share the work load among each other. The site ran really well for about a week.

And then came the end of the year.

I started seeing many Internal Server Error 500 type error codes when trying to load the site. A quick glance at error logs showed they all consisted of the same issue: the site was timing out for some reason. This also reflected itself in the visitor counts. Not only did the number of visitors started going down, the number of pages per visit also went down. Makes complete sense: if a website is too slow, you are less likely to spend time on it.

Things got really bad starting about December 28th, with me basically unable to access the site or the admin panel at all. I finally started doing some serious digging into the problem on January 1st. I noticed that even though the site was down, I was still able to access static files on the site, such as images or a simple text file I uploaded for testing. PHP scripts also executed fine, showing that there was nothing wrong with the Apache server or the PHP parser. Accessing the site itself however remained impossible.

This left too possibilites: a) either something was wrong with WordPress or a plugin, or b) something was wrong with the database. Option a) could be due to some malware. In mid December I found two strangely-named PHP files in the root of my website which did not belong there. After bit of Googling of the text in the files, I found they were part of one of the latest hacking of GoDaddy sites, something that GoDaddy failed to inform me about. However, lucky for me, it did not appear that the files have actually executed. They were designed to recursively inject all PHP files (there is like 100 of them in a WordPress installation) with a bit of redirect malware, but I did not find this code in any of my files.

Yet, even though my WordPress seemed to be malware free, there was the possibility that something got inadvertently corrupted. Another possibility was that one of the plugins was misbehaving. One of the greatest things about WordPress is that it’s fully customizable. Not only you can get different themes, you can also get pluggins, little snippets of code that provide functionality such as subscribing to comments, or protecting your site from spam. However, if these plugins start working improperly they can bring down the whole site.

I started by testing this, by renaming the plugins folder to essentially disable all plugins. But that did not solver the problem.

So, this seemed to point at the database. To test this, I wrote a little test script to fetch a row from the database. When I tried it using an auxiliary database I’ve been using to store the folks who entered the sweepstakes, everything worked fine. However, moment I switched it retrieve data from the main WordPress database, the infamous Internal Server Error 500 appeared.

I had my culprit: it was the WordPress database. WordPress stores all the info in a database (basically a collection of tables) and if the database goes down, well, so does your site.

This is when I had my “D’uh!” moment. Even though I upgraded my site to the Deluxe Grid hosting, my database likely still resided on the shared server which was being inundated with traffic. I guess it was silly of me to expect the GoDaddy staff to actually move my database and modify the WordPress settings for the low price of few bucks a month I pay for hosting.

So I created a new empty database. The issue now was moving the data.

On January 2nd, the site was pretty much inaccessible. I came home from watching a hockey game (Caps vs. Pittsburgh Winter Classic) in a bar, and the site was down. I tried in the morning, it was still down. Things got so bad that not only I could no longer access the site directly, I could not even log in to the database through phpmyadmin, a web interface used to work directly with databases (think of it like an online version of Excel, but nerdier). After logging in, the phpmyadmin screen would remain blank for few minutes. Then the right side containing some control panel options appeared, but the actual list of tables did not for another 10 minutes. Exporting the database, operation that is supposed to take a minute or two, took almost 3 hours. And we are not talking about a large database: the database for this site consists of under 10 tables, with none containing more than few thousand rows. This is a quite small database by the modern standards.

Well to make a long story short, I was finally able to get the database exported. The next issue came up trying to import it in (nothing seems to go smooth the first time for some reason!). After the import, the site loaded super fast, but I noticed that every post ended at the first non-ASCII character (i.e. Slovak characters with accent mark). These characters were in the file I exported but caused an error during the import. I eventually tracked this down to what’s called encoding. There are many different formats how to represent different letters on a computer, and these are called encoding. The encoding my file was saved in (Latin-1) was not the same as what was expected by the database (utf-8). After bit more digging around in options of Notepad++, I was able to get everything saved in the correct format.

Who-hoo!!!

Since the switch to the new database, the site has been lighting fast. The load time, as measured by the tools mentioned above, went from 8 seconds to under 2. Hopefully it will stay like this. Keeping my fingers crossed.

I still don’t know what exactly happened. It’s possible that as I suspect the database was hosted on a really busy server (the IP address of the new database is different), or perhaps the database file got corrupted in some way that was slowing down it’s parsing.

Plans for 2011

But that’s definitely whole lot more technical details than you care about! To get back to the site, and Slovak recipes, what’s in the store for 2011?

Well, my #1 goal this year will be to complete my dissertation work. I would very much like to graduate this December – and so would my adviser. But besides that, I plan to travel to Slovakia again this summer. My sister will be graduating with her masters, and I don’t want to miss that. Then, I want to spend some time exploring the country. Even though I am originally from Slovakia, there are many famous sights I have yet to visit, including the Spis Castle and Slovak Paradise National Park. One great way to explore the country would by through hiking it. There is a hiking trail running through all of Slovakia. The trail is dedicated to the heroes who fell during World War II, and goes from Bratislava to Dukla. Doing this trail, and stopping in villages along the way to collect stories from grandmothers would sure be an amazing journey!

In addition, there are few tweaks I plan for this site, including support for printing. I would also like to start working on a cookbook, but I think that’s something I should wait for until after I finish school.

Finally, I would like to thank you to all who have contributed to the site in one way or another. This includes those who have submitted recipes, left comments, and the over 100 people who have donated to the site so far. Thank you all, and double thank you to all who have donated. I am saving the money to buy a new digital SLR.

I would love to hear from you. What suggestions do you have and what would you like to see on the site?

And of course, Happy New Year (Štastný Nový Rok) to all!