the main relay controls the fuel. A lot of the time if it's about to die, it will be affected by the heat. so if you leave your car in the hot sun for a while with the windows rolled up, this will cause it not to start properly.
there's not really any tell-tale signs of a bad relay, unless you really cook it.
Does it start up fine at night time when it's cooler? or when you open the doors/windows for a couple minutes?