本文介绍了从mysql视图WCF OData Service-Timeout过期问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用mysql DB创建了wcf OpenDataServices。我快速从表中获取数据。但是当我尝试从视图中获取数据时,它会抛出超时异常。直接在数据库中尝试数据的速度非常快。



我尝试在web.config中设置以下内容。

I have created wcf OpenDataServices with mysql DB. I am getting data from tables in a quick flash. But when I tried to get data from a view, It is throwing timeout exception. When tried directly in db data is getting very quickly.

I tried by setting the following in web.config.

<system.serviceModel>
    <bindings>
      <netTcpBinding>
        <binding name="NetHttpBinding" maxBufferPoolSize="2147483647"  closeTimeout="00:01:00"
                 openTimeout="00:01:00"  maxConnections="10"
                 receiveTimeout="00:10:00"
                 sendTimeout="00:10:00"
          maxBufferSize="524288" maxReceivedMessageSize="2147483647" />
      </netTcpBinding>
    </bindings>
    <services>
      <service name="MyService">
        <endpoint address="http://localhost:59825" binding="netTcpBinding"
          bindingConfiguration="NetHttpBinding" name="HttpBinding" />
      </service>
    </services>
    <serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
  </system.serviceModel>





仍有超时异常。



编辑1:



当我尝试使用表时,数据正在增加。我为该表创建了一个视图,从同一个表中选择*并尝试使用该视图的抛出超时异常。当使用数据较少的表的视图时,这个问题不存在。



请帮忙。



谢谢,

Jaison。



still timeout exception.



When I tried with a table, data is getting. I created a view for that table as select * from same table and tried with that view its throwing timeout exception.This issue is not there when using views of tables with less data.

Please help.

Thanks,
Jaison.

推荐答案


这篇关于从mysql视图WCF OData Service-Timeout过期问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-27 12:11