2015-03-02 46 views
0

我有幾個免費的鐵軌應用程序運行在heroku上運行得很好,我沒有問題。Rails應用程序痛苦地加載緩慢

但是這一次

kearns.herokuapp.com

是加載這麼慢!因爲我每隔幾分鐘就會檢測一次,測功機不會睡覺。

如果有人有時間,他們可以快速訪問,看看他們認爲可能是什麼?會真的很感激它!

CSS

@import "twitter/bootstrap/bootstrap"; 

// Set the correct sprite paths 
@iconSpritePath: image-url("twitter/bootstrap/glyphicons-halflings.png"); 
@iconWhiteSpritePath: image-url("twitter/bootstrap/glyphicons-halflings-white.png"); 

// Set the Font Awesome (Font Awesome is default. You can disable by commenting below lines) 
@fontAwesomeEotPath: font-url("fontawesome-webfont.eot"); 
@fontAwesomeEotPath_iefix: font-url("fontawesome-webfont.eot?#iefix"); 
@fontAwesomeWoffPath: font-url("fontawesome-webfont.woff"); 
@fontAwesomeTtfPath: font-url("fontawesome-webfont.ttf"); 
@fontAwesomeSvgPath: font-url("fontawesome-webfont.svg#fontawesomeregular"); 

// Font Awesome 
@import "fontawesome/font-awesome"; 

// Glyphicons 
//@import "twitter/bootstrap/glyphicons.less"; 

// Your custom LESS stylesheets goes here 
// 
// Since bootstrap was imported above you have access to its mixins which 
// you may use and inherit here 
// 
// If you'd like to override bootstrap's own variables, you can do so here as well 
// See http://twitter.github.com/bootstrap/customize.html#variables for their names and documentation 
// 
// Example: 
// @link-color: #ff0000; 



p.navbar-text a:hover { 
    text-decoration:none; 
} 
#phone a:hover { 
    text-decoration:none; 
} 

#overflow { 
    overflow:hidden; 
} 

html, body { 
    overflow-x:hidden; 
} 

#welcome_container { 
    overflow:auto; 
    padding-bottom:40px; 
} 

.jumbotron { 

    position:relative; 
    top:-320px; 
    background:transparent; 
    text-align:center; 
    color:#fff; 
    margin-bottom:0; 
    padding-bottom:0px; 

} 
.jumbotron h1 { 
    position:relative; 
    font-weight:bold; 
    border-bottom:1px solid #fff; 
} 
span { 
    color:#F9DF31; 
    color:#FAED49; 
    font-family:Tahoma; 
    font-style:italic; 

     } 

.jumbotron p { 
    margin-bottom:35px; 

} 

.test { 

    position:relative; 
    top:-320px; 
    background:transparent; 
    text-align:center; 
    color:#fff; 
    margin-bottom:0; 
    padding-bottom:0px; 
} 
.test h1 { 
    position:relative; 
    font-weight:bold; 
} 
.test p { 
    margin-bottom:35px; 
    margin-top:25px;; 
} 


#about_container { 
    margin-top:70px; 
} 
#map_container { 
    background:#fff; 
} 


// Images 

#home_image { 
    margin-top:40px; 
} 
.img-polaroid { 
    margin-top: 80px; 
} 

// ------ 


#block { 
    height:50px; 
} 

#middle { 



    padding-bottom:60px; 
    padding-top:30px; 
} 


/* 
----------------------------- 
Navbar 
----------------------------- 
*/ 

.navbar-default { 
    background:#023249; 
    border-color:#008AE6; 
    border-color:#fff; 
    } 
.navbar-default .navbar-nav > li > a { 
    font-size: 13px; 
    font-family: "Libre Baskerville", sans-serif; 
    color:#fff; 
} 
.navbar-default .navbar-nav > li > a:hover { 
    color:#CAFF42; 
    color:#F9DF31; 
    color:#FAED49; 


} 
.navbar-default .navbar-brand { 
    color:#fff; 
    font-size:2em; 
    color:#FAED49; 
    font-family:Tahoma; 
    font-style:italic; 
    font-weight:bold; 

} 

.navbar-default .navbar-brand:hover { 
    color:#FAED49; 
    color:#FAED49; 
} 

.navbar-text { 
    font-size:13px; 
    padding-top:3px; 
    font-style:italic; 
    font-family:sans-serif; 
    font-family:helvetica; 
    color:#fff; 
} 
p.navbar-text a { 
    color:#fff; 
} 
p.navbar-text a:hover { 
    color:#CAFF42; 
    background:#023249; 
    color:#F9DF31; 
    color:#FAED49; 
} 
p.navbar-text { 
    color:#fff; 
} 





// Home Page 


.background-image { 
    height:525px; 
    background-image:asset-data-url("good.jpg"); 
    background-repeat:no-repeat; 
    background-size: 1500px 525px; 
    text-align:center; 

    background-color:#fff; 

} 

@media screen and (min-width: 1550px) { 

    .background-image { 
    background-size: 100% 525px; 
    } 
} 

#welcome_container { 

    padding-top:30px; 
} 

#text_block { 
    height:300px; 
    background:#000; 
    margin-top:150px; 
    opacity:0.5; 
} 

#image_row { 
background:#064780; 
background:#F6FAFB; 
background:#49708A; 
} 








// Contact & Map 

#map { 
    height:400px; 
    width:100%; 
    margin:0; 
    background:gray; 
} 








// Headings 

h3.center-text { 
    text-align:center; 
    margin-top:40px; 
} 
h3.home { 
    text-align:center; 
    color:#fff; 


} 



// Paragraphs 

p.welcome-text { 
    color: #333; 
    font-size: 19px; 
    font-family: "Libre Baskerville", 
    serif; line-height: 40px; 
    text-align: justify; 

    padding-top: 10px; 
} 

p.image-text { 
    color: #333; 
    font-size: 18px; 
    font-family: "Libre Baskerville", 
    serif; line-height: 30px; 
    text-align: justify; 

    padding-top: 20px; 
} 

p.service-text { 
    color: #333; 
    font-size: 17px; 
    font-family: "Libre Baskerville", 
    serif; line-height: 40px; 
    text-align: justify; 






} 



// Misc 

.push { 
    margin-bottom:50px; 
} 
#no_line { 
    text-decoration:none; 
} 



// Buttons 

.btn btn-primary { 
    color:#fff; 
} 




// Services Page 

#service_row_2 { 
    margin-top:70px; 
    background-color:#E6E6E6; 
} 
#service_first_para { 
    margin-bottom: 40px; 
} 
#service_header { 
    margin-top:50px; 









    background:#F6FAFB; 
    background:#064780; 
    background:#A0C2DE; 
    background:#49708A; 




} 
#service_heading { 
    margin-top:45px; 
} 
#service_h4 { 
    text-align:center; 
} 

/* 
------------------------- 
    Catalog Page 
------------------------- 
*/ 


#catalog_header { 
    margin-top:100px; 
    background:#001A29; 


} 
#catalog_heading { 
    margin-top: 45px; 
} 
#catalog_first_para { 
    margin-bottom: 40px; 


} 
#catalog_h4 { 
    margin-top:50px; 
} 



/* 
------------------------- 
    About Page 
------------------------- 
*/ 

#about_header { 
    margin-top:50px; 
    background:#023249; 
    margin-bottom:40px; 
} 

#about_div { 
    height:500px; 

} 
#about_div_second { 
    margin-top:50px; 
} 
#staff_heading { 
    text-align:right; 
} 


/* 
----------------------------- 
    Footer 
----------------------------- 
*/ 

#footer { 

    height:100px; 
    background:#fff; 



} 
#footer h3 { 
    color:#fff; 

} 

回答

1

哇,您的application.css文件(http://kearns.herokuapp.com/assets/application-c515eba896f4bd53f59a05b117a195e0.css現在)超過16 MB。它看起來像你包括實際的圖像文件 - 它應該只有圖像的網址。

+0

我知道!但是對我的圖像的唯一參考是這行代碼「background-image:asset-data-url(」good.jpg「);」在我的CSS – user2085143 2015-03-02 19:48:30

+0

你可以發佈你的這部分CSS文件看起來像資產編譯之前? – basiam 2015-03-02 19:49:43

+0

我添加了我的CSS文件。 (我正在使用bootstrap) – user2085143 2015-03-02 19:52:29

0

您可以在Heroku上免費添加new relic插件和考試系統深感這是怎麼回事,怎麼你的應用程序反應請求。