Get a second master to have better references? I obtained my M. Sc. in mathematics from a decent European university about a year ago (when I was 27). Due to various reasons of personal nature, my marks were the equivalent of a 3.0 GPA, or something like that, and it took me quite a while to finish. I wanted to drop out at some point, also because of the same issues, which led to a change in my thesis' topic, arguments and a not-so-good relationship with my advisor, who agreed to keep me until graduation anyway. 

Right after obtaining the degree, my problems gradually subsided and I got a reasonably good job in the consulting industry, which of course I am not interested in, but I accepted because I had to. However, my interest for math and physics recently rekindled, to the point that in the little time I can spare from my job I find myself picking up my old books, and reading new ones and it's getting harder and harder to do something I dislike on a daily basis. 

I realized I wasted a good chance and now I wish to apply to a Phd program (anywhere, really, with the condition that it be a reasonably good one) as I feel I am a bit too young to accept how things have played out, but all I have right now is a mediocre GPA and no way to obtain strong recommendation letters to compensate. Therefore I think my chances to get into a good program are very slim (feel free to correct me though, if you think otherwise). 

I feel my only chance would be to get into another (1 or 2 years long) M. Sc., perhaps in applied math this time and enter an environment where I can:


improve my record
get in contact with people who could help me with recommendation letters in the future. 


Here come my questions: is this plan sensible? Does a candidate with 2 M. Sc. in similar subjects raise eyebrows?
Feel free to offer further advice on what my options are if you have any.
I wouldn't if I were you. Of course grades and reference letters matter but to spend another year or two putting yourself in debt just for reference letters seems like a lot. You will also be two years older, and with no guarantee to get the position you want. I would try to apply for PhD's anyways, or if needed, try to find a project for a few months in the group/area you are interested for the PhD. In Europe there is funding for exchange students/projects. I spent a year in Sweden after finishing my MSc. back in the Netherlands. This was paid for by a stipend from my supervisor in Sweden.

Doing a project will allow you to see if this is the topic you want to do a PhD in, and also if this is the right group. If you do a good job and the supervisor has money for a PhD student, you can apply. If not, you can apply elsewhere using this supervisor as a reference.

Good luck.