Akiva stayed away from his wife for 24 years. Per Kesuvos 61b, this is forbidden. As a talmid chacham, he might be able to stretch it to a week, but not more. Was this an aveira?
2 Answers
See the Gemara Kesubos 62B which discusses Talmidey Chachomim leavening home to learn
הַתַּלְמִידִים יוֹצְאִין לְתַלְמוּד תּוֹרָה שְׁתַּיִם וְשָׁלֹשׁ שָׁנִים שֶׁלֹּא בִּרְשׁוּת
Students of the Torah may depart for Torah study for two or three years without their wives' permission.
That is the way the Rambam and Shulchan Aruch pasken.
That is without permission. The Gemora then continues with many stories of Rabbis who had permission (this is where the story of Rav Akiva is related ) who left their wives for over ten years to learn.
I learned this from a rabbi here in Brazil.
Rabbi Akiva married Rachel, the daughter of a very rich man in whom Akiva was an employee of that man. She proposed marriage to him and he was illiterate, did not consider himself worthy of her, she told him that when they got married he was going to study the Torah even against his father's will, for he had said that he would dispossess her of his estate, she married him anyway and they went to live in a hayloft. Rabbi Akiva went to the Yeshiva and stayed there for 12 years, without contact with his wife, he came back very wise, on the way he heard his wife talking to a man saying “Well done to her, he married an ignorant man who left a long time, ago 12 years without seeing her”, she replied that by her will he would stay another 12 years studying Torah, Rabbi Akiva heard that and did her will, he went 24 years without seeing his wife, he had 24 thousand students. So by the merit of his wife that ignorant 40 year old bachelor became one of the wisest of the Jewish people. In this they understand that a woman can, if she wants to, give up her marital right if she goes to study Torah.