What to do with repeated rejections for PhD position Background: 

I have been applying for a PhD in the last three years to more than 150 positions, very much specific to my skills and background. I only applied when I found positions' requirements matching my skills and experience. 

I got the same response for all those positions. I almost gave up and went offline. After few months, I noticed a couple of emails from a professor, who liked my profile very much and was very interested in contacting me. I responded and got interviewed. However, he didn't find me suitable for position and advertised again for the very same position.

After a couple of months I applied to another project/position of the same Research Centre, thinking I may have chance in this group, but as usual they rejected but they said I came second. 

After a couple of months, they said they are advertising again and I should apply since I was in top three. However, as usual, they got better candidate this time as well. 



In a nutshell, I have been rejected for more than 150 positions and only one group who found me very suitable candidate rejected three times. While I cannot describe how I am feeling I also don't know whether to take it as positive that they interviewed me three times or that even they didn't find me suitable for something which I was very much capable of. 

My question Is if it's all normal, or should I give up on looking for PhD positions. 

With every day I am not getting any younger and my chances are decreasing. It has been around 3.5 years since I have done my master's. With every rejection, I have been trying to rectify errors and mistakes and improvements but all in vain so far. 

Thanks in advance.
You say you have been rejected a lot, but give no indication whatever of why that is. It isn't random, I suspect. I can suggest two possible scenarios and from them you can, perhaps, devise a strategy. 

The first situation is that you are just applying to places that are so off the scale that no one is actually likely to be admitted. The top institutions normally have tremendous competition for slots and some of them have very few slots available. Dartmouth, in CS, for example is a great institution, but its doctoral program is very small. If they get hundreds of applications for any available position, then the likelihood of any particular person gaining admission is pretty miniscule. So perhaps you are just aiming too high. Since you have come close a few times, perhaps not impossibly high, but there are probably other options. 

The second is that you are deficient in some way and need to improve either your technical or personal skills or both. That isn't criticism, since I don't know anything about you, but perceived issues are probably apparent to people once you get into the application process. Arrogant people don't find easy acceptance, to name just one personal "flaw" that some folks exhibit. At the other end of the scale, people who project extreme introversion often come off as less able than they are. 

As for the technical side, you can work on that without formally being in a program. You can study and write in your field, for example. If you have the time and can expend the effort to do it effectively, you will improve the skills that others may feel you lack. 

But, it is important, I think, that you also find a way to learn at least a bit about why you haven't made the cut. Perhaps someone you have corresponded with in the past can point you in the direction you need to go. Feedback can be valuable, not just about your final position in the ranking, but why you weren't higher. Find a way to ask.