Many of our beliefs concerning the period called 'Birthpangs of Moshiach' come from Talmud Tractate Sanhedrin Folia 97a-97b
http://halakhah.com/sanhedrin/sanhedrin_97.htmlBabylonian Talmud: Tractate Sanhedrin
the tabernacle of David ha-nofeleth [that is fallen].'1 He replied, 'Thus hath R. Johanan said: in the generation when the son of David [i.e., Messiah] will come, scholars will be few in number, and as for the rest, their eyes will fail through sorrow and grief. Multitudes of trouble and evil decrees will be promulgated anew, each new evil coming with haste before the other has ended.'
Our Rabbis taught: in the seven year cycle at the end of which the son of David will come-in the first year, this verse will be fulfilled: And I will cause it to rain upon one city and cause it not to rain upon another city;2 in the second, the arrows of hunger will be sent forth;3 in the third, a great famine, in the course of which men, women, and children, pious men and saints4 will die, and the Torah will be forgotten by its students; in the fourth, partial plenty;5 in the fifth, great plenty, when men will eat, drink and rejoice, and the Torah will return to its disciples; in the sixth, [Heavenly] sounds;6 in the seventh, wars; and at the conclusion of the septennate the son of David will come. R. Joseph demurred: But so many septennates have passed, yet has he not come! â€” Abaye retorted: Were there then [Heavenly] sounds in the sixth and wars in the seventh! Moreover, have they [sc. the troubles] been in this order7 !
[Wherewith thine enemies have reproached, O Lord,' wherewith they have reproached the footsteps of thine anointed.]8 it has been taught, R. Judah said: in the generation when the son of David comes, the house of assembly9 will be for harlots, Galilee in ruins, Gablan lie desolate,10 the border inhabitants11 wander about from city to city, receiving no hospitality, the wisdom of scribes in disfavour, G-d-fearing men despised, people12 be dog-faced,13 and truth entirely lacking, as it is written, Yea, truth faileth, and he that departeth from evil maketh himself a prey.14 What is meant by 'yea, truth faileth [ne'edereth15 ]'? â€” The Scholars of the School of Rab16 said: This teaches that it will split up into separate groups17 and depart.18 What is the meaning of 'and he that departeth from evil maketh himself a prey [mishtollel19 ]'? â€” The School of R. Shila said: He who departs from evil will be dubbed a fool by his fellow-men.20
Raba said: I used to think at first that there is no truth in the world.21 Whereupon one of the Rabbis, by name of R. Tabuth â€” others say, by name of R. Tabyomi â€” who, even if he were given all the treasures of the world, would not lie, told me that he once came to a place called Kushta,22 in which no one ever told lies, and where no man ever died before his time. Now, he married one of their women, by whom he had two sons. One day his wife was sitting and washing her hair, when a neighbour came and knocked at the door. Thinking to himself that it would not be etiquette [to tell her that his wife was washing herself], he called out, 'She is not here.' [As a punishment for this] his two sons died. Then people of that town came to him and questioned him, 'What is the cause of this?' So he related to them what had happened. 'We pray thee,' they answered, 'quit this town, and do not incite Death against us.'23
It has been taught: R. Nehorai said: in the generation when Messiah comes, young men will insult the old, and old men will stand before the young [to give them honour]; daughters will rise up against their mothers, and daughters-in-law against their mothers-in-law. The people shall be dog-faced, and a son will not be abashed in his father's presence.
It has been taught, R. Nehemiah said: in the generation of Messiah's coming impudence will increase, esteem be perverted,24 the vine yield its fruit, yet shall wine be dear,25 and the Kingdom will be converted to heresy26 with none to rebuke them. This supports R. Isaac, who said: The son of David will not come until the whole world is converted to the belief of the heretics. Raba said: What verse [proves this]? it is all turned white: he is clean.27
Our Rabbis taught: For the Lord shall judge his people, and repent himself of his servants, when he seeth that their power is gone, and there is none shut up, or left:28 the son of David will not come until denunciators are in abundance.29 Another interpretation [of their power is gone]: until scholars are few. Another interpretation: until the [last] perutah has gone from the purse. Yet another interpretation: until the redemption is despaired of, for it is written, there is none shut up or left, as â€” were it possible [to say so] â€” Israel had neither Supporter nor Helper. Even as R. Zera, who, whenever he chanced upon scholars engaged thereon [I.e., in calculating the time of the Messiah's coming], would say to them: I beg of you, do not postpone it, for it has been taught: Three come unawares:30 Messiah, a found article and a scorpion.31
R. Kattina said: Six thousand years shall the world exist, and one [thousand, the seventh], it shall be desolate, as it is written, And the Lord alone shall be exalted in that day.32 Abaye said: it will be desolate two [thousand], as it is said, After two days will he revive us: in the third day, he will raise us up, and we shall live in his sight.33
It has been taught in accordance with R. Kattina: Just as the seventh year is one year of release in seven, so is the world: one thousand years out of seven shall be fallow, as it is written, And the Lord alone shall be exalted in that day,' and it is further said, A Psalm and song for the Sabbath day,34 meaning the day that is altogether Sabbath â€” 35 and it is also said, For a thousand years in thy sight are but as yesterday when it is past.36
The Tanna debe Eliyyahu teaches: The world is to exist six thousand years. In the first two thousand there was desolation;37 two thousand years the Torah flourished;38 and the next two thousand years is the Messianic era,39