Still setting up barriers: Àrea Metropolitana blocks Next bus Barcelona’s server!

Monitoring of the “next arrivals” call: the peak is originating from the no-response of the AMB server. It goes back to normal after switching to Tor.

Update (20/Apr/2015 09:50): The IT department from Cetramsa has contacted me and told me that the server was automatically blocked on Saturday due to a high amount of requests. However, analyzing the server history I found no requests peak at all on Saturday. The block is still active, but they will remove it.

Yesterday my app Next bus Barcelona started reporting that the servers from AMB (Àrea Metropolitana de Barcelona) were down, and the alternate TMB server was being used. At first I didn’t worry at all because this tends to happen on some weekends: the AMB server stops working and noone restarts it until Monday morning (I guess that asking for a person that checks it in these cases is too costly for the administration…). However, this morning my monitoring service at Monitis started reporting that the services were reporting an error. When I logged in to the server to check what was happening, I discovered that the host “www.ambmobilitat.cat” was not responding at all. There was a bug in my code that resulted in an Internal Server Error, which I fixed in 5 minutes, but the root cause was that the AMB servers were down. Nothing too alarming: as I said, his tends to happen more frequently than it should.

However, what has really upset me is that the official app “AMB Temps bus” and the website were really up and getting real-time data correctly. So I decided to check if it was only a problem in my server.

Guess what:

  • I can communicate to www.ambmobilitat.cat from my own computer with no problem at all:
ereza@sylvarant:~$ wget http://www.ambmobilitat.cat/Principales/Inicio.aspx
--2015-04-19 13:47:53-- http://www.ambmobilitat.cat/Principales/Inicio.aspx
S'està resolent www.ambmobilitat.cat (www.ambmobilitat.cat)... 194.30.12.199
S'està connectant a www.ambmobilitat.cat (www.ambmobilitat.cat)|194.30.12.199|:80...connectat.
HTTP: s'ha enviat la petició, s'està esperant una resposta...200 OK
Mida: 145314 (142K) [text/html]
S'està desant a: «Inicio.aspx»

100%[===================================================================================================================================================================================================>] 145.314 613K/s en 0,2s

2015-04-19 13:48:02 (613 KB/s) - s'ha desat «Inicio.aspx» [145314/145314]
  • A server on the same subnet as the Next bus Barcelona server has no problem at all either:
root@brinstar:~#  wget http://www.ambmobilitat.cat/Principales/Inicio.aspx
--2015-04-19 13:50:37--  http://www.ambmobilitat.cat/Principales/Inicio.aspx
Resolving www.ambmobilitat.cat (www.ambmobilitat.cat)... 194.30.12.199
Connecting to www.ambmobilitat.cat (www.ambmobilitat.cat)|194.30.12.199|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 145314 (142K) [text/html]
Saving to: `Inicio.aspx'

100%[===================================================================================================================================================================================================>] 145,314      391K/s   in 0.4s    

2015-04-19 13:50:39 (391 KB/s) - `Inicio.aspx' saved [145314/145314]
  • The Next bus Barcelona server can’t contact the AMB server:
root@crateria:~# wget http://www.ambmobilitat.cat/Principales/Inicio.aspx
--2015-04-19 13:50:40--  http://www.ambmobilitat.cat/Principales/Inicio.aspx
Resolving www.ambmobilitat.cat (www.ambmobilitat.cat)... 194.30.12.199
Connecting to www.ambmobilitat.cat (www.ambmobilitat.cat)|194.30.12.199|:80... failed: Connection timed out.

This seems to point out that my server has been blocked by IP address. Here is a diagram to make it more understandable to everyone:
server_connectivity

I want to believe that this is the result of an automatic blocking and not a manual block. However, past incidents tell me that it could well be a manual block. I will try to contact Àrea Metropolitana to ask for directions.

Meanwhile, in order to avoid a service disruption to the users, I have configured my scripts to use Tor (I copied the idea from Roc Boronat, who already did this on his Vicing app). By doing this, I can circumvent the blocking, and the IP address will vary on each request, so it become difficult for them to block me again. This has a drawback: connection will be a little slower, because of all the additional layers between my server and the AMB server, but for now it will do (let’s hope that it will handle all Monday morning traffic successfully). The non-realtime data fetching scripts still don’t use Tor, but they are not critical (the previous data will be available). Again, here’s a little diagram:
server_tor_en

Anyway, I would like to ask the Àrea Metropolitana, Barcelona City Council, and whoever is in charge: Is this the “open data” you promote? How can anyone create any product (commercial or not), with the possibility of suddenly losing access to the data? If this is a manual block, why are the public entities so afraid of an app made by someone on their free time? Why are the servers down on Sundays? What do I have to do to avoid having more problems with my app?

Also, I am still waiting for anyone from CETRAMSA to contact me in order to access their data in an official way. And that’s one year and a half since they told me they would. I know that there have been some efforts in opening some data, but no one has ever contacted me warning me of changes or telling me that they have put out data. However, they did have time to add “Proper BUS” (sic) to the list of users of “open” data.

Posted in Programming, Server Tagged with: , , , ,

Next bus Barcelona: No traces of the data

Exactly two months ago I had a meeting with CETRAMSA about the Next bus Barcelona case, because they had sent me a bureaufax threatening me to unpublish my application. The news spreaded throw Twitter and appeared on some newspapers, so they decided to take part in the issue and appointed a meething with me so we could discuss it. In that meeting, they told be that they would handle me access to the data in an official way, because the Barcelona City Council wants to open data and they though it would be nice to open it. From what we talked, it seemed that everything would be very quick, that same day they asked me to republish the application and told me that in the following days, they would handle me access to the data so I wouldn’t need to make requests to their website simulating a browser.

Since then, my communication with CETRAMSA has been basically reminder e-mails, and they always told me that we have to wait until the Metropolitan Area has it ready. I have feedback from the Barcelona City Council (of which, I will repeat again, I have never had any complaint, because they have always been very understanding) indicating that they are preparing the data, but until now, no one has been able to give me an ETA.

Then, this week CETRAMSA published a new version of the AMBtempsbus application, very improved from the previous one, as it now includes a map, stops search and routes, as my application already did months ago. And surprise, I have been investigating and they get the data from the Internet, from a publically available URL, and without password! The same data they haven’t handled to me because they are preparing it.

I don’t want to think that this is in bad faith from CETRAMSA, I want to think that everything is a bureaucratic conflict, but on the other side, if the data is already available on the Internet, why they don’t just handle me the address? The City Council is interested in opening the data, but the concessionary companies, maybe not so much…

Posted in Android, Programming

App name localization in apps using the Android Runtime for BlackBerry

Today I will explain a little trick I have been using to localize the name of my Android apps in the BlackBerry system menu. I have not found any documentation for this on Google, so I’ll explain my solution.

When I started porting some of my apps to BlackBerry the first thing I observed was that the application name was not localizable. Of course, it is within the Android code, but the name shown on the BlackBerry menu (at least on the Playbook) is always the default one (in English). If your app has a custom name that’s not a problem, but when the app name is translatable, it looks just wrong.

So, I explored a little bit. I searched in message boards and found someone that was talking about “.bbr” files (this was a long time ago and I don’t have the link right now). I started searching and ended up finding a part of documentation that someone posted in PasteBin (maybe some part of BlackBerry’s or QNX documentation? I don’t know!). In it, it described the parameters which can be specified on the MANIFEST.MF file, which identifies and describes your BlackBerry app.

So, after some tests (and looking at the decompiled code of the BlackBerry Android Tools), I figured out that I just had to specify a parameter with the supported languages and get it included on the manifest file, so I did that (I will explain the full process further on).

But after compiling this into a BAR file, the system complained that there was no MANIFEST_ca.bbr, MANIFEST_en.bbr or MANIFEST_es.bbr file. I tried to get it recognized by Eclipse, but it wouldn’t. I tried adding it manually to the BAR file, but obviously then it complained because it was not properly signed.

So I found out an alternative. It’s a little crappy, but it works: running a shell script that injects the .bbr files onto the temporary files created during the BAR building process (a directory on /tmp/apk2bar[…]/).

So, let’s explain all the necessary steps.

1. Create a MANIFEST.MF file inside your project, on the following path: assets/blackberry/MANIFEST.MF, with at least the following code:

Package-Locale: [your language codes, separated by commas, example: en,es,ca]

2. Make sure that your manifest gets combined into the automatically generated manifest: right-click on your project in Eclipse, select Properties, then BlackBerry, and set “Custom BAR manifest” to “Add custom values (merge)”. Then save the changes.

3. Create a directory with all your .bbr files and this script (add_localization.sh). Each .bbr filename must be “MANIFEST_[language code].bbr”, and must contain the following parameters:

Entry-Point-Localization: [your default app name]
Entry-Point-Name: [your localized app name]

For example, in my case, MANIFEST_ca.bbr would have:

Entry-Point-Localization: Next bus Barcelona
Entry-Point-Name: Proper bus Barcelona

4. When you are ready to build your BAR file, simply run the add_localization.sh script. When execution starts it will start checking for when the apk2bar directory gets created, and will then copy the .bbr files into it.

5. Build the BAR file. If all went well, the script should output “Files copied into temporary directory!”. Your BAR file should contain all the .bbr files.

Please keep in mind that this script does no error checking, and can have concurrency problems, so you should always check your generated BAR files to see if all the .bbr files got included into it.

Now you can run your app and the correct name according to the system language will be shown!

Posted in Android, BlackBerry, Programming, Shell-scripting Tagged with: , , , , , , ,

Next bus Barcelona is up again – Thanks!

This morning I had a meeting with CETRAMSA about the case of the Next bus Barcelona app. The meeting has been positive and we have decided to publish the following communications (in Spanish, sorry!):

From CETRAMSA:

A raíz de los comentarios publicados en la red social y en el diario El País sobre la aplicación app Próximo Bus Barcelona queremos informaros y poneros al día de todo esto:
1.- No se ha interpuesto ninguna demanda judicial contra el titular de la aplicación app Próximo Bus Barcelona.
2.- CETRAMSA colabora con varias entidades privadas cediendo la información necesaria de sus bases de datos para que sea operativa y eficiente para el usuario del transporte público toda la información que resulta de estas aplicaciones. De forma recurrente y habitual la información que facilitamos es objeto de actualización, mejoras, cambios, etc., si no existe una correcta actualización podría originar una gran confusión al usuario del transporte público. Este es el motivo por el que todas las entidades y personas que han precisado de esta información, han contactado y consensuado con nosotros el normal funcionamiento de sus aplicaciones respecto a nuestras bases de datos.
3.- En este sentido CETRAMSA y el Sr. Eduard Ereza, titular de la aplicación app Próximo Bus Barcelona, ya han normalizado y consensuado el normal funcionamiento de la aplicación, respecto a la información que esta empresa está en condiciones de abrir las bases de datos para el uso de la mencionada aplicación, que estará disponible esta misma mañana.

From me:

A raíz de la polémica suscitada por la publicación en varios medios y redes sociales de la eliminación de la aplicación “Próximo bus Barcelona”, me gustaría hacer las siguientes puntualizaciones:
– Por parte de CETRAMSA se han mostrado dispuestos en todo momento a encontrar una solución al conflicto generado, y la actuación de todos los profesionales implicados ha sido la adecuada a las circunstancias.
– Hemos llegado a un acuerdo de colaboración, que permite restablecer inmediatamente el funcionamiento de la aplicación Próximo bus Barcelona. CETRAMSA se ha mostrado a favor de los datos abiertos en todo momento, y únicamente ha pedido que se le notificara la intención de utilizar esos datos, de modo que fuese posible garantizar la seguridad y actualización de los mismos.
– Asumo mi parte de culpa en el conflicto por no haber contactado previamente con el Área Metropolitana, solicitando permiso para el uso de los datos e indicaciones para su correcta gestión. A pesar de eso, mi única queja ha sido en todo momento por la comunicación oficial en el momento inicial, requiriendo la eliminación de la aplicación. Todas las conversaciones posteriores han sido razonables y en pro de buscar un acuerdo positivo para las dos partes y para Barcelona.
Considero, por tanto, cerrado este tema.

On a more personal level, I would like to use this post to thank for the support and messages from all the users. Without you, nothing would be possible. Thank you to all of you one more time.

You can download the app from Google Play or from BlackBerry World (the links could take a while to become operative because of update reasons).

Posted in Android, Programming Tagged with: , , , , ,

Update to the Next bus Barcelona case

This has been finally solved: Next bus Barcelona is up again

About what I commented on my previous post, I would like to comment some new events in the case.

21/10/2013 10:53

This morning, the lawyer which signed the bureaufax has contacted me, saying that CETRAMSA, from the very first minute, only wanted to warn me, because the data I use changes daily and they were worried because there could be some inconsistency (for example, some user could complain because they accessed a bus stop which had been deleted). He has told me that they were never planning to send a complaint, or report me, and he has shown me their worries about the messages which were spreading on message boards and Twitter.

He has told me that they want to get a meeting with me during this week, so we can talk about this subject, as they want the app to access data in a secure way and in a way which makes the data always real. He told me that they will contact me when they have availability.

21/10/2013 12:32

I have been contacted by CETRAMSA to agree to a meeting tomorrow at 9:00. They have expressed again their disconformity with the comments posted by other people in message boards and tweets, because they never wanted to file a complaint. They say that there is no problem with the application, but it has to use their data obtention systems so the data is correctly up-to-date.

This is the current state as of today, I will keep updating this post when any new events occur. Right now, the app is still disabled.

I would like to say thanks for all the comments, messages and support tweets. There have been so many, and they really motivate me to keep going, it looks like my job really made people a bit happier. Thank you very much.

Last update: 21/10/2013 10:53

Posted in Android, Programming Tagged with: , , , ,

Legal requirement from CETRAMSA

Latest update: Next bus Barcelona: No traces of the data

This has been finally solved: Next bus Barcelona is up again

Please read the previous status update here: Update to the Next bus Barcelona case

Today I received by bureaufax a legal requirement submitted by a law firm informing me that CETRAMSA (Centre Metropolità d’Informació i Promoció del Transport, SA), the authors of the AMBTempsbus app, says that I am making an unfair use and taking advantage of their application, and that my application Next bus Barcelona violates their intellectual property rights. They request the immediate removal of the application, and the destruction of all data property of CETRAMSA associated with it.

Logically, the application has already been removed from Google Play and BlackBerry World, and I have already destroyed the database used on the server. No one can download the application, and who already had downloaded it, receives an error message when using the app.

Next bus Barcelona was developed in an afternoon of boredom, because when I had to catch the bus, the TMB application ​​was slow to check. You had to open it (which took a few seconds), go to the iBus option, enter the code for the bus stop, and wait for the data to load (and many times, it wouldn’t load!). I realized that a new application had just appeared (AMB Temps bus) that allowed to search only by entering the stop code, and then you already had all the data needed, and even more, it also showed data for the non-TMB lines. But it was a simple webpage that did that, there was no chance of checking the next arrivals without knowing the stop code, no map, not even the option to save a list of favorite stops (months later, they added it, but it has never worked properly). As this seemed important to me, I thought it would be a good idea to create a more intuitive application, with more features, based on the data already provided by AMB Temps bus.

Initially, the application was a simple list of favorite bus stops and a call to the AMB Temps bus website to get arrival times. I didn’t even intend to publish it in Google Play, believing that most people already had enough with the AMB or TMB apps, and maybe I was very picky and had to code my own application just to save a few seconds. But some time later, I thought I could add other features to it, and why no, try to publish it on Google Play to see if, as I already had done the work, maybe someone was interested in it too.

I did not expect at all the response to the application: it became the 10th most downloaded transport application in Spain (position that it held today, before I unpublished it), well above AMB Temps bus, and near the TMB application (TMB Virtual). With 50,000 downloads and 33,000 active users, it has been a great success. Over time, and many times due to user suggestions, I have added many new features to it: search, map, QR scanning, graphical bus routes, etc. All this has made it very superior to the rest of those of its kind published on Google Play (although, of course, there are always many things to improve!).

I understand that AMB (and CETRAMSA) don’t like this, because an application developed by a simple person in his spare time is taking users from their official application, which surely must have costed a lot of money. It is true that I am making use of their data (which I think should be considered public, as we already paid with our money for that public company’s work ), but I’m causing no harm to the company, because I only give an added value that their application does not offer, and I don’t tamper the data or wrongly appropriate it (I have always statedd that the data is not of my property).

In the context of Barcelona, the Mobile World Capital, and a great promoter of open data, it seems incredible that these things can happen, and that a public corporation can enforce someone to remove his application, simply because it offers an additional service that the administration itself should offer. If things were done the right way from the beginning, I would have never created the application, and we would not be where we are now.

I don’t think it was necessary to reach these extremes to send a legal requirement. Had I been contacted, we could have reached an agreement, or at least we could have talked about the problems that I caused to them, so we could fix them, and we would never have come to this point. But apparently, they took the other way.

Well, I don’t want to extend this many more, I guess the application has ended as of now. From here, I want to thank all the users who downloaded it, who used it (many of them daily) and who sent suggestions for improvement (there were many, and I still hadn’t been able to answer them all!). Hopefully, one day we will meet again. Meanwhile, you can use AMB Temps bus.

Posted in Android, Programming Tagged with: , , , ,

My experience with HoloEverywhere

I have been using HoloEverywhere for a while on my application “Next bus Barcelona“, and I thought it would be nice to share my experience with this library.

HoloEverywhere, in case you don’t know it already, is a library which attempts to make it easy for you to have the same look & feel across all Android versions starting from 2.1 to the most current one. It does this by recreating the Holo theme from Android 4.x. I must say that, of course, it isn’t easy to develop such a library. Some things can’t be solved by simply theming the old widgets, and have to be implemented from scratch, or by subclassing some Android classes. This is what HoloEverywhere does. Oh, and by the way, you must take into account that it has to carry many of the Holo resources, so this library will add about 3,3 MB to your existing application.

Hoping that it would make it easier to get an uniform Holo style across all platforms, I decided to implement it on my apps. I decided to try it with “Next bus Barcelona”, and the result seemed nice. Changing your app to use HoloEverywhere is simple but tedious, as you have to replace all references to Android widgets with their HoloEverywhere equivalents. It can take a large time if your app has a large codebase.

1st problem: The first problem was with some of the equivalent classes. I had some references in my app to the BaseAdapter class, obtained from ListView.getAdapter(). That gave me a ClassCastException, because the class returned by HoloEverywhere does not subclass BaseAdapter, and you have to change your BaseAdapter to ListAdapterWrapper.

2nd problem: The second problem was with a Spinner which kept the view from refreshing. It turned out to be a bug in HoloEverywhere, and I found a workaround on StackOverflow.

3rd problem: The third problem was that I had an Activity which was using a dialog theme, and it crashed on Android versions lower than 4.0. I rewrote it by using a DialogFragment, and everything went fine…

4th problem: Until I realized that the dialog wasn’t showing a title on Android versions lower than 4.0. I checked the HoloEverywhere code and managed to implement a workaround.

At this moment, and having solved all these  bugs, everything was working correctly, and I decided to publish the new version of my app, using HoloEverywhere 1.5.0. The app had no problems, until I released a new version with HoloEverywhere 1.5.1 instead of 1.5.0. So…

5th problem: I started getting reports from users which had some Sony Xperia phones (Sony Xperia U with Android 2.3.7, for example), telling me that the lists in the application disappeared.

I re-released it quickly by downgrading to 1.5.0, and everything went nice again…

6th problem: Until some other users, with many different phone models, started reporting that the app randomly hangs with a white screen. I don’t see any other reason to be a cause for this other than HoloEverywhere, so I decided to update to the latest stable version, 1.6.8, and ask one of the users to test it. Although she couldn’t reproduce the white screen problem, the ListViews which had scroll all disappeared, just like it happened with 1.5.1.

Finally: After all these problems, I have removed HoloEverywhere from my project. Yes, my app buttons and texts don’t look the same on every Android version out there, but I have got rid of many annoying bugs, and even better… my app is now 3,3 MB tinier!

In conclusion, we all know that every library has some bugs, it’s normal, there is no developer which makes no mistake. But when you have to use a library for a project (which isn’t anything outside of the normal project in Android), and you stomp on a pair of known bugs, and have to report four bugs yourself, some of them for common functionality like dialogs or context menus, I wouldn’t recommend it for production use.

Maybe someday HoloEverywhere will be less buggy and easier to integrate. I hope so, because it could make it easier for many developers to design their apps. But right now, I can’t quite recommend you to use it.

Posted in Android, Programming Tagged with: , , ,

Avoid using onConfigurationChanged

If you are an Android developer, chances are that you have been tempted to implement screen orientation configuration changes yourself. That is, adding the following attribute to your activities on AndroidManifest.xml:

<activity android:name=".MyActivity" 
    android:configChanges="keyboardHidden|orientation|screenSize" />

And then overriding the onConfigurationChanged method on your activity:

@Override
public void onConfigurationChanged(Configuration newConfig) {
    super.onConfigurationChanged(newConfig);
    //your own stuff to handle orientation change, if needed
}

Well… Just DON’T do it. Avoid using this solution, and use it only as a last resort. As the Android developer guide explains:

This technique should be considered a last resort when you must avoid restarts due to a configuration change and is not recommended for most applications.

Because this method is so frequently proposed as a solution to many activity recreation problems, and simplifies everything because you don’t have to deal with activity recreation on orientation changes, I ended up using it for all my activities on my apps. And then, bugs arose.

First point: ActionBarSherlock shows strange behavior when you are handling configuration changes for yourself. In my case, everything seemed to work, but in devices with Android <4.0, after rotating the screen, the tabs on the navigation bar were completely frozen and didn’t react to any click. As Jake Wharton states in one of the bug reports:

FYI this may never be fully fixed. Avoid handling configuration changes at all costs.

Second point: AlertDialogs also seem to have similar problems, even on the latest versions of Android. I had some which, after several screen orientation changes, also became unclickable. I don’t know why, but I’m pretty sure that the cause is similar to the reason why ActionBarSherlock becomes unclickable too.

So… What should you do? Well… just use the normal way of handling configuration changes in activities for Android. That is, being aware that your activity can be recreated and saving and restoring its state by using the onSaveInstanceState() and onRestoreInstanceState() methods, or using the fragments setRetainInstance() method. Be sure to check the official Android guide to handling configuration changes.

Posted in Android Tagged with: , , , ,

Upgrading CDmon’s Virtual Up server from Ubuntu Natty to Precise

As I previously stated on my last blog post, I switched to CDmon several months ago, and I am still happy with the change.

However, I had a concert: the installed Ubuntu version on my server was getting old, as it was Ubuntu 11.04 (Natty Narwhal). Seeing that it was already unsupported, and no longer receiving any vulnerability fixes, I asked CDmon’s technical support if they planned to upgrade their set of installable operating systems (which includes other old ones, like Fedora 15 or CentOS 5.7). They responded that I could do the upgrade myself, just being careful not to change the kernel.

I suppose that CDmon Virtual Up services use Xen paravirtualization, because the required kernel dates back to Ubuntu 10.04 (Lucid Lynx) times! Although the reported Linux packages installed are the Natty versions, the running kernel is 2.6.32-5, as you can see:

root@tethealla:~# uname -a
Linux tethealla 2.6.32-5-xen-amd64 #1 SMP Tue Mar 8 00:01:30 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux

So… if the kernel which is being used is not the current one… then why bother? Just backup, and upgrade to the newer version! I installed the update manager package:

apt-get install update-manager-core

Then run the upgrader:

do-release-upgrade

That upgraded it to Oneiric. Of course, it asked what to do with some configuration files I changed, as usual.

After rebooting, which completed with no problem, had to run it again to upgrade to Precise. So, repeat:

do-release-upgrade

After rebooting, I got 100% CPU usage by rsyslog. Apparently, there is a known bug in rsyslogd which causes it to eat all your CPU when using certain kernels (maybe this is due to having an old kernel…!) So, i had to disable kernel logging to get it back to normal, as explained on the bug responses:

sed -i -e 's/^$ModLoad imklog/#$ModLoad imklog/g' /etc/rsyslog.conf

After another reboot, all problems were fixed and the server up and running! However, I find this quite funny:

root@tethealla:~# lsb_release -idrc
Distributor ID: Ubuntu
Description: Ubuntu 12.04.2 LTS
Release: 12.04
Codename: precise
root@tethealla:~# uname -a
Linux tethealla 2.6.32-5-xen-amd64 #1 SMP Tue Mar 8 00:01:30 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux

Well, that’s it! Successfully upgraded the system to a LTS without any major problem. Now I won’t have any worries until 2017!

Posted in Server Tagged with: , , , , , ,

Migration to a VPS at CDmon

Now that I am starting to finish my personal website, I want to explain quickly my latest experience with web hosting.

For the last 5 years, I have been hosting all my sites on A2Hosting: they had very cheap shared hosting, and I was very happy with all their services. Until about some months ago.

Few months ago, I started getting some database connection errors on some of my sites. I thought that it could be because of high activity traffic by spammers (I had some spam attacks on the phpBB forums I hosted). They were really rare so I didn’t actually bother, because none of the sites I hosted were critical.

Around a month ago, I started noticing it more often. Even applying policies to fight irrelevant spammer’s requests, I kept having the same errors. Sometimes, the website was down for almost 30 minutes. I ran some cleanup queries on my forums, and every time I tried to ran them, the database connection failed and none of my domains were able to access the database (even when using different users!). I finally asked A2Hosting support, and, after FIVE! hours, they just replied that I was having slow queries, and their automatic scripts were cutting database connections for some time. Of course, if I wanted to stop getting those errors, I had to move to a higher cost plan.

And I did. I switched to a Virtual Private Server (VPS) on CDmon. And I couldn’t be happier. I have installed all the software I need, and I have full control of everything. Yes, it is much more costly, but it’s absolutely worth it! I can manage my software, set custom configurations, set up any scripts I could need, and stop getting stupid connection issues, sudden outages, unexpected & unannounced PHP updates which make my sites crash, etc. Even more, they are from my own country and I can have really fluid communication with them.

Furthermore, I have also migrated all e-mail acccounts to Google Apps (I was already using Google Apps for my main site and I am very happy with it, and I didn’t want to bother setting up my own mail server because I have no experience on this subject).

So this is the quick summary of the events. Quicker summary: A2Hosting was cool but now it is no longer. CDmon is REALLY cool!

Posted in Software Tagged with: , , , , , , , , , ,